Are there any differences when compiling a java class using a shell script and using eclipse?
I wrote a shell script which compiles a Java class. The .class file is called from a C++ JNI class. However the FindClass function returns NULL, meaning that the class could not be found.
I compiled the same source code using eclipse and replaced the .class file. Surprisingly, the FindClass function was able to find the class.
Could someone give me an explanation for this?
I guessing that the script fails to set CLASSPATH or LD_LIBRARY_PATH correctly, but Eclipse does. Second one is more likely because you mentioned JNI.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.