in .bashrc is written:
PYTHONPATH="${PYTHONPATH}:$Home/local/lib/python2.7/site-packages/"
export PYTHONPATH
LD_LIBRARY_PATH="$Home/local/lib/"
export LD_LIBRARY_PATH
CLASSPATH="/home/stud/qe09kyvu/local/lib/liblpsolve55j.so"
export CLASSPATH
When i try to run this command:
java -cp .:../lib/lpsolve55j.jar -Djava.library.path=../liblpsolve55j.so Demo
i get the following error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lpsolve55j in java.library.path
But i don't understand this error, because in .. there is liblpsolve55j.so
To run lpsolver, you need two things.
platform/os specific binary like listed below and you should keep them in the corresponding library path or export corresponding environment specific property
Language specific wrapper for invoking the lp_solver method present in the above binary file. For Java you need liblpsolve55j.jnilib and lpsolve5j.o file. Either the location of these should be added to java.library.path or add them to the above platform-specific environment variable.
In your case, it seems like you are all set in step 2, but you are missing the step 1. For Step 1, instead of environment variable, you can include the path in the java.library.path that you are alreay passing. I gave you an example below.