#Where are the Java libraries stored?

1 messages · Page 1 of 1 (latest)

gaunt ingotBOT
#

<@&987246399047479336> please have a look, thanks.

gaunt ingotBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

pulsar cobalt
#

wdym

#

just check the doc

quick anchor
#

Like in Lua there is package.path that contains all of the possible paths where to take the file that the program requires

#

What is the path of the Java built-in libraries?

pulsar cobalt
#

wdym

#

there is no path

#

why do you want to get that ?

quick anchor
#

Because I do not like the method Maven and Gradle use

pulsar cobalt
#

why ?

#

and those are different

#

they will search 3rd party libs

quick anchor
#

iirc everytime you build a project it downloads the libraries from the internet, making not possible to develop a Java project offline

pulsar cobalt
quick anchor
#

Where are the packages like java.io are stored

pulsar cobalt
#

how it wouldn't work ?

#

you seem to misunderstand what maven is

#

maven will automatically download and install 3rd party libs

quick anchor
#

Where?

pulsar cobalt
#

and stuff like java.io is not 3rd party libs

pulsar cobalt
quick anchor
pulsar cobalt
#

in the user folder

#

but that won't help you

#

those are 3rd party libs

quick anchor
pulsar cobalt
#

java.io is included in java by default

gaunt ingotBOT
#

Closed the thread.

pulsar cobalt
#

please

pulsar cobalt
# quick anchor

what you have here are languages libraries, the same as java.io
this is not the case of 3rd party

quick anchor
#

I just want to make a library manager that installs the libraries to the folder where are the built-in Java libraries are stored like java.io and javax.swing

pulsar cobalt
#

ah

#

why ?

quick anchor
#

Because that would be easier to use just import, javac and java

#

Like

#

Install a library, and use it everywhere

pulsar cobalt
#

it's already kinda the case

#

I mean

#

you could set the classpath to .m2

quick anchor
pulsar cobalt
#

this would be a terrible idea since you would have hundreds if libs on the classpath, but it would work 🤔

pulsar cobalt
wide dirge
#

I think you probably misunderstand why dependency manager exists. that's exactly what dependency manager uses for. Alathreon been kindly try to figure out why you want to do that

quick anchor
pulsar cobalt
#

the classpath is paths where java will search for classes

quick anchor
#

So it is

pulsar cobalt
#

but like I said, this is a terrible idea

#

dependency managers exist for that

quick anchor
#

Where can classpath be modified?

pulsar cobalt
#

you write in the pom which lib you want to use, and it will install them, end of the story

pulsar cobalt
#

note that it will override any other classpath set

#

so unless you are not using an ide, it won't work

quick anchor
#

Can classpath be modified for every project? Like changing the default classpath in Java folder

pulsar cobalt
#

you could

#

there is an environment variable for that

#

I think it's JAVA_OPTS or something like that ?

#

but like I said

#

this will probably break everything

quick anchor
#

Is it stored in the Java folder or is it a real environment variable?

pulsar cobalt
#

it's a real environment variable

quick anchor
#

Oh

#

Ok, thanks

pulsar cobalt
#

but like I said

#

this will just break everything

#

since everything relies on classpath

#

you are not supposed to do that

#

you are supposed to fill your pom

#

correctly

quick anchor
#

What if I just add another path to the environment variable?

#

Or it will break anyways

#

?

pulsar cobalt
#

wdym

#

the simple fact of changing the classpath when you are using an ide will break things

#

as I said

#

just write your libs in the pom

quick anchor
#

"some/classpath;another/classpath;" + "a/new/classpath;"

pulsar cobalt
#

stop ignoring half of what I say