Search code examples
javaeclipsejvmclassloaderunsatisfiedlinkerror

java.lang.UnsatisfiedLinkError when i load a jar .


I ' m programming with JSE and i'm loading a jar (that i do ) with another java program . The problem is in classLoader of java virtual machine i think . i said that beacuse i tried to exec the file jar with java -jar "file.jar" and it runs . I'm using xubuntu with eclipse. In eclipse, i have 2 project that respectively are the first software that loads jar and the jar software . To export the jar file i use the wizard "Export -> jar ecc...." How can i resolve this problem?

Exception in thread "main" java.lang.UnsatisfiedLinkError: /media/sda4/so_project/proj/example/first.jar: /media/sda4/so_project/proj/example/first.jar: invalid ELF header (Possible cause: endianness mismatch) 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 it.unicam.project.Binterpreter.getClassHandle(Binterpreter.java:170) at it.unicam.project.Binterpreter.(Binterpreter.java:100) at it.unicam.project.Test.main(Test.java:12)


Solution

  • That's because you're running a 32bit JVM on a 64bit platform