how to set java library path for processing

后端 未结 4 1892
广开言路
广开言路 2020-12-03 01:35

I\'m using PDE to run a Processing sketch, and I get the following error:

Verify that the java.library.path property is correctly

相关标签:
4条回答
  • 2020-12-03 01:46

    You can set it on the command line thus:

    java -Djava.library.path=...
    

    and point it to the directory containing the relevant library.

    0 讨论(0)
  • 2020-12-03 02:00

    Before System.loadLibrary(""), use the following code to check you java.library.path

    System.out.println(System.getProperty("java.library.path"));

    Generally,the java.library.path=/usr/java/packages/lib/i386:/usr/lib/jni:/lib:/usr/lib

    Provides several options for:

    • $ sudo cp libxxx.so /usr/lib/jni
    • java -Djava.library.path=path of so xxx
    0 讨论(0)
  • 2020-12-03 02:04

    In Eclipse, I did this to get OpenCV working:

    1. In the Run menu, select Run Configuration.
    2. Go to the (x)=Arguments tab of your sketch.
    3. Add this in the VM arguments field:

      -Djava.library.path="/path/to/OpenCV/library"
      
    0 讨论(0)
  • 2020-12-03 02:05

    Your library.path is fine, what you need to do is to drop prefix lib and suffix .so from your System.loadLibrary( "..." ). On Linux or "linux-android" those will be automatically added by JVM.

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