JNI question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • %NAME%

    #1

    JNI question

    I have the following error when my JNI class tries to load the shared
    library:

    Exception in thread "main" java.lang.Unsat isfiedLinkError : /XXXXX.so:
    ld.so.1: /software/javajdk-1.5/bin/sparcv9/java: fatal: /XXXXX.so: wrong ELF
    class: ELFCLASS32
    at java.lang.Class Loader$NativeLi brary.load(Nati ve Method)
    at java.lang.Class Loader.loadLibr ary0(ClassLoade r.java:1751)
    at java.lang.Class Loader.loadLibr ary(ClassLoader .java:1676)
    at java.lang.Runti me.loadLibrary0 (Runtime.java:8 22)
    at java.lang.Syste m.loadLibrary(S ystem.java:992)

    I am compiling and running under solaris, using jdk 1.5.0

    does any of you have the same problem before?

    thanks a lot!


  • Gitta Zahn

    #2
    Re: JNI question

    %NAME% wrote:
    [color=blue]
    > I have the following error when my JNI class tries to load the shared
    > library:
    >
    > Exception in thread "main" java.lang.Unsat isfiedLinkError : /XXXXX.so:
    > ld.so.1: /software/javajdk-1.5/bin/sparcv9/java: fatal: /XXXXX.so: wrong ELF
    > class: ELFCLASS32[/color]

    It seems that you use the option "-d64" when starting the JVM.
    In this case you should build your native library as 64bit library
    using the option "-xarch=v9" and link with the 64 bit version of
    the jvm.

    Gitta

    Comment

    Working...