Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to set java library path for processing

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

Verify that the java.library.path property is correctly set.

Could anyone of you tell me how to solve this problem?

like image 520
Haiyuan Zhang Avatar asked Sep 05 '25 03:09

Haiyuan Zhang


2 Answers

You can set it on the command line thus:

java -Djava.library.path=... <existing arguments (classpath, name of class to run etc.)>

and point it to the directory containing the relevant library.

like image 167
Brian Agnew Avatar answered Sep 08 '25 00:09

Brian Agnew


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
like image 37
caopeng Avatar answered Sep 07 '25 23:09

caopeng