jpl.dll: Can't find dependent libraries - java

I am using java netbeans and want to use prolog api in it but i keep getting error
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Program Files\swipl\bin\jpl.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1939)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1864)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1825)
at java.lang.Runtime.load0(Runtime.java:792)
at java.lang.System.load(System.java:1059)
at contacteditor.Advisory.<init>(Advisory.java:18)
at contacteditor.ContactEditor.main(ContactEditor.java:21)
Can anyone help me out please ?

Related

java.lang.UnsatisfiedLinkError: no bridge2java in java.library.path

Can anyone write me how to deal with this error? I am running a project with eclipse (from 2012-2014) configured for Windows. I do it on a Mac but Parallels whit windows 11
What library to use and how to add it, if something else needs to be done ?
Exception in thread "main" java.lang.UnsatisfiedLinkError: no bridge2java in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at com.ibm.bridge2java.OleEnvironment.Initialize(OleEnvironment.java:10)
at tr.com.yurticikargo.kopsproject.client.YKEdsFrame.main(YKEdsFrame.java:41)

rJava and java web app integration error

Trying to call R from Java Program and we see the following error:
Please make sure that the JRI native library is in a directory listed in java.library.path.
java.lang.UnsatisfiedLinkError: D:\Apps\Analytics\statistics\R\sdk\library\rJava
\jri\x64\jri.dll: %1 is not a valid Win32 application
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1880)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at org.rosuda.JRI.Rengine.<clinit>(Rengine.java:19)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
This and this answer helped me to solve same issue.
I used newer tool Dependencies and found that R.dll and jvm.dll was not found.
So I added R.dll to the path as is written in JRI FAQ

GLPK java java.lang.UnsatisfiedLinkError: Can't find dependent libraries

The dynamic link library for GLPK for Java could not be loaded.
Consider using
java -Djava.library.path=
The current value of system property java.library.path is:
\\MILP\lib\glpk-4.55\w64
Exception in thread "main" java.lang.UnsatisfiedLinkError:
\\MILP\lib\glpk-4.55\w64\glpk_4_55_java.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.gnu.glpk.GLPKJNI.<clinit>(GLPKJNI.java:24)
at org.gnu.glpk.GLPK.glp_version(GLPK.java:2259)
at TestMain.main(TestMain.java:7)
I have added the correct JAR file
I have given the correct native path for the library
Still the problem persists,
One doubt I have is that the \MILP\lib\glpk-4.55\w64\glpk_4_55_java.dll file is flawed. I checked it using dependencyWalker there it shows some warnings
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Any leads would be appreciated
I also faced same issue. I copied glpk_4_55.dll and glpk_4_55_java.dll to C:\Windows\System32 and Everything works fine for me.
You can add the C:\Program Files\GLPK\glpk-4.55\w64 folder to your PATH environment variable
or
copy the glpk_4_55.dll and glpk_4_55_java.dll to C:\Windows\System32 as suggested by Pradeepb

liblpsolve55.so: cannot open shared object file: No such file or directory

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 !
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").

JNI UnsatisfiedLinkError dependent libraries

I have a JNI dll along with a jar file that I have created on a machine with eclipse.
I am trying to deploy this to another machine and cannot get past the exception
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\CcmAccess\CcmJNIBase.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Meth
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.sig.ccm.CcmBase.<clinit>(CcmBase.java:8)
at ReadTimeDomain.setupSample(ReadTimeDomain.java:24)
at ReadTimeDomain.main(ReadTimeDomain.java:97)
I have another program that prints out the java.library.path and I have verified the dll that this dll depends on as well as this dll are in the java.library.path.
I have read posts where they should go in the current directory and that doesn't work.
I have read posts where they should go in the jre/bin and that gets the same result.
Any help would be appreciated.
Edit:
If I take everything out of the path and force the classpath to only have the jar file and "." I get the message
Exception in thread "main" java.lang.UnsatisfiedLinkError: no CcmJNIBase in java.library.path
When I add the location of this dll into the path C:\CcmAccess I get the full message:
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\CcmAccess\CcmJNIBase.dll: Can't find dependent libraries
On the machine that this seems to work all I had to do was add the dependent dll to my classpath.
Double check your java.library.path value.
Make sure that you are using an absolute path.
Relative paths will make you think your java.library.path is correct, when actually it is actually incorrect.
If you are adding "." in your java.library.path, then you need to double check the "current working directory" when you execute your code.
If you need to use a relative path in your java.library.path, make sure that the path is relative from the "working directory" when you execute your code.

Categories

Resources