I\'m looking for a simple explanation of the relation between java.library.path and the classpath. Though I\'m hardly a newbie, I have never had to mess with the j.l.p. But we
What is the relation between java.library.path and the classpath?
None, the only thing they have in common is that they are both paths.
Are classes found on j.l.p visible to the compiler?
No.
do you have to specify the j.l.p on the command line of the compiler?
Never. You only need this at runtime.
Can you specify these classes on both the j.l.p and the classpath?
Only put classes on the class path.
The j.l.p is equivalent to the LD_LIBRARY_PATH and tells the OpenJDK/HotSpot JVM where to find shared native libraries like .DLL
or .so
not JARS, not classes.
http://examples.javacodegeeks.com/java-basics/java-library-path-what-is-it-and-how-to-use/