javac is a command of JDK not JRE so why is the javac command picking up jars from the ext folder of jre when we have an internal lib folder of jdk.
Tony Docherty wrote:
javac is a command of JDK not JRE so why is the javac command picking up jars from the ext folder of jre when we have an internal lib folder of jdk.
Have you tried looking in the two lib folders and see what they contain and why do you think the jdk/lib folder should contain the java runtime jars?.
Avinash Haridasu wrote:How does the javac (not java) pick the libraries it needs, to compile the application given to it.
Avinash Haridasu wrote:What i am still not clear is why the javac command is compiling the application when the libraries are added to jre\ext.
Tony Docherty wrote:I guess you could write your own ClassLoader which kept track of which jar files it had loaded classes from (although I'm not sure how you would handle classes loaded by the bootstrap clas loader), but why do you want to know?
* Finds and loads the class with the specified name from the URL search
* path. Any URLs referring to JAR files are loaded and opened as needed
* until the class is found.
What's that smell? Hey, sniff this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|