So I'm quite new to eclipse (first week of actually trying to use it to develop stuff.) and I tried to import an example project from http://unfoldingmaps.org/ and upon trying to compile their test project I'm greeted with the error:
Eclipse Error: Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: no jogl in java.library.path
Right now my $path sys var looks like this:
C:\csvn\Python25\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\SourceGear\Common\DiffMerge\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\MySQL\MySQL Server 6.0\bin; %JAVA_HOME%;%ANT_HOME%\bin
Is there something that I'm missing? Jogl.jar is in the project but it seems like the project is just skipping over stuff.. help?
It seems that your application requires some sort of native library, you need to specify the parameter -Djava.library.path=/path/to/libs on the VM args field on eclipse.
Related
I'm trying to setup libpostal/jpostal on my Windows 10 machine in a Java environment. I followed the Windows Installation Guide on GitHub.
I am able to see the libpostal folder installed under: C:\xxx\Program Files\libpostal\ with sub folders: .git, autom4te.cache, data, m4, resources etc.
However, when I run:
AddressExpander expander = AddressExpander.getInstance();
I get the following error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpostal_expander in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at com.mapzen.jpostal.AddressExpander.<clinit>(AddressExpander.java:7)
at jpostal.JPostal.execute(JPostal.java:24)
at global_projects.GlobalMain.main(GlobalMain.java:37)
I normally use Maven for my build. However, since there is currently no Maven repository for JPostal, I am using Gradle.
I followed the solution suggested on this GitHub thread by adding the following gradle.build file, however I still get the same error.
What am I doing wrong?
I have JRE made for Android. I am trying to execute /data/local/tmp/j/java but that gives
following error:
Error occurred during initialization of VM Unable to load native library:
The other files for java are at: /data/local/tmp/java.
I have executed following commands:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/java/lib/jli
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/java/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/java/lib/server
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/java
But the same error as above is still showing. The reason why i have moved java executable to /data/local/tmp/j/java is because on Android you can only execute and include lib[name].so files in jniLibs/abi so i am unable to move bin, lib folders to /jniLibs/abi.
I would be very grateful if someone could help me out with this as i am working for days to get this completed.
I'm trying to use Java bindings for the project https://github.com/openalpr/openalpr
When I try to launch the java application i got this exception
Exception in thread "main" java.lang.UnsatisfiedLinkError: no openalprjni in java.library.path
I try to load the library in this way:
System.loadLibrary("openalprjni");
The file named libopenalprjni.so it's in this dir
/Users/mario/Sviluppo/openalpr/src/bindings/java
so i'm trying, with eclipse, to load it with this configuration as a VM argument
-Djava.library.path=/Users/mario/Sviluppo/openalpr/src/bindings/java/ but nothing happens
What i'm doing wrong?
Include the openalpr.dll and the required all other dll files from the binaries to your JRE or JDK bin directory. Then try to compile and run your program.
Worked for me.
for me worked:
System.load("/usr/lib/libopenalprjni.so");
Hi i have a problem with a jpl interface. I want connect JPL with swi-prolog installed with mac-ports with eclipse. I have a jpl.jar and i have tried to import the jar file in eclipse with build path but i have this error: "no jpl in java.library.path".
So i have copied libjpl.dylib in a /opt/local/lib/swipl-7.1.29/bin/ and when i execute the code i have this error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/local/lib/swipl-7.1.29/bin/libjpl.dylib: dlopen(/opt/local/lib/swipl-7.1.29/bin/libjpl.dylib, 1): Library not loaded: /Users/janw/stable/lib/swipl/lib/x86_64-darwin13.0.0/libswipl.dylib
Referenced from: /opt/local/lib/swipl-7.1.29/bin/libjpl.dylib
Reason: image not found"
After a anoying waste of time i found the solution about that problem.
First of all, its completely necesary to install swi-prolog via macports, if not, as i did, when you point in the
Djava.library.path=/users/rivax/Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin13.0.0
this exception will apear
Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/rivax/Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin13.0.0/libjpl.dylib: dlopen(/Users/rivax/Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin13.0.0/libjpl.dylib, 1): Library not loaded: /Users/janw/stable/lib/swipl/lib/x86_64-darwin13.0.0/libswipl.dylib
Referenced from: /Users/rivax/Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin13.0.0/libjpl.dylib
Reason: image not found
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 jpl.JPL.loadNativeLibrary(JPL.java:100)
at jpl.fli.Prolog.<clinit>(Prolog.java:85)
at jpl.Query.open(Query.java:286)
at jpl.Util.textToTerm(Util.java:162)
at jpl.Query.<init>(Query.java:198)
at consultasProlog.Consultas.consultaFicheroProlog(Consultas.java:19)
at utilidades.RellenarModelo.ejecutarArchivo(RellenarModelo.java:30)
at javaprolog.JavaProlog.main(JavaProlog.java:30)
Java Result: 1
So follow these steps.
port install swi-prolog on terminal , if you dont have install already macports command not found will apear so go to https://www.macports.org/install.php and install macports.
navigate to the path of swi prolog macports installation which mine is
/opt/local/lib/swipl-6.6.6/lib/x86_64-darwin14.0.0
copy this path and set in java.library.path in the java VM as -Djava.library.path=/opt/local/lib/swipl-6.6.6/lib/x86_64-darwin14.0.0
Now .pl with jpl.jar will be able to execute and the consults will run.
Hope it will help you and every person who find this hell problem.
Cheers frank.
I created a new project and a new class in eclipse in my ubuntu machine to write the simple Hello World program. It works fine as long as i write the main method and use System.out.println to print my "Hello World". but i want to use the acm.jar package so I imported it to my project and tried to extend the ConsoleProgram class in acm.jar but once i write the public void run() method and try to run it i get some error
i know that i have imported acm.jar successfully because eclipse suggested the rest of the import when i was typing import acm.program.*;
here is the results i get:
Exception in thread "main" java.lang.NoClassDefFoundError: sun.applet.AppletViewer
at gnu.java.lang.MainThread.run(libgcj.so.90)
Caused by: java.lang.ClassNotFoundException: sun.applet.AppletViewer not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/home/bilm3z/workspace/xbSampleProject1/bin/,file:/home/bilm3z/workspace/acm.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.90)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at gnu.java.lang.MainThread.run(libgcj.so.90)
here is a snapshot of the situation:
http://www.mypicx.com/12302009/situation1/
It follows from your stack trace that you're using a GCJ JVM. Try installing the Sun JVM - there are instructions here. (Note that you might have to enable different repositories for this, and note the update-java-alternatives command.)
After you install the Sun JVM, update your Eclipse preferences according to Bozho's answer, so that your Eclipse uses the correct JVM.
That's strange. Try Right click on your project > Build path > Configure built path > libraries, remove the JRE / JDK from there (if it exists), and add it anew - Add library > JRE System Library