You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Eric G <g_...@yahoo.com.cn> on 2006/10/19 09:21:26 UTC

why I cannot load tcnative-1.dll

Hi, 

I tried to use Apr win32 library tcnativa-1.dll I got from here http://tomcat.heanet.ie/native/1.1.6/binaries/win32/. I used a very simple java class to load the library, but I got the following exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: unsupported JNI version 0xFFFFFFFF required by G:\tmp\opensrc\p2\apr\1.1.6\tcnative-1.dll
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
        at java.lang.Runtime.loadLibrary0(Runtime.java:822)
        at java.lang.System.loadLibrary(System.java:992)
        at Test.main(Test.java:5)

The Test.java has the following code:

public class Test {

    public static void main(String[] args) throws Exception {
        System.loadLibrary("tcnative-1");
        System.out.println("loaded tcnative-1 successfuly");
    }
}

The compiled Test.class and tcnative-1.dll were put in the same directory, and I executed "java -cp . Test" there.

Anyone who knows the reason can help?

Thanks,
Eric


 		
---------------------------------
 Mp3疯狂搜-新歌热歌高速下   

Re: why I cannot load tcnative-1.dll

Posted by Mladen Turk <mt...@apache.org>.
Eric G wrote:
> > Hi,
> >
> > I tried to use Apr win32 library tcnativa-1.dll I got from here
> > http://tomcat.heanet.ie/native/1.1.6/binaries/win32/.

This question is for Tomcat developers list

> > I used a very
> > simple java class to load the library, but I got the following exception:
> >
> > Exception in thread "main" java.lang.UnsatisfiedLinkError: unsupported
> > JNI version 0xFFFFFFFF required by
> > G:\tmp\opensrc\p2\apr\1.1.6\tcnative-1.dll


You need the org.apache.tomcat.jni.*
in the classpath.

Regards,
Mladen.