2

Good Morning, I am working with lpsolve with eclispe and in Java.

I can import correctly the program but when running it I got the exception :

Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/lp_solve/liblpsolve55j.so: liblpsolve55.so: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)
    at java.lang.Runtime.loadLibrary0(Runtime.java:844)
    at java.lang.System.loadLibrary(System.java:1051)
    at lpsolve.LpSolve.<clinit>(LpSolve.java:275)
    at scheduler.Main.main(Main.java:353)

Or, I have edited the native library path which is : usr/lib/lp_solve.

Can anyone help me ? Thank you !

JoshDM
  • 4,939
  • 7
  • 43
  • 72
benDir
  • 51
  • 1
  • 4

1 Answers1

2

Apparently Eclipse is finding liblpsolve55j.so in /usr/lib/lp_solve but is not looking in the same place for liblpsolve55.so.

The only workaround I found is to manually load the library with System.load("/usr/lib/lp_solve/liblpsolve55.so").

Decly
  • 379
  • 2
  • 11