What is the relation between java.library.path and classpath

前端 未结 1 988
不知归路
不知归路 2021-02-08 05:56

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

相关标签:
1条回答
  • 2021-02-08 05:59

    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/

    0 讨论(0)
提交回复
热议问题