简体   繁体   中英

Java Native Access in JDK 1.3

I'm trying to integrate JNA into JDK 1.3 application. JNA pages have following on this subject:

Supported on 1.4 or later JVMs (earlier VMs may work with stubbed NIO support)

I've managed to port JNA sources to JDK 1.3 by dropping all java.nio references. I do not need for example java.nio.Buffer.

However, JNA DLLs are compiled to use Java NIO types and complain accodingly:

JNA: Problems loading core IDs: java.nio.Buffer

What do I need to do to make JNA work in JDK 1.3? What does this "may work with stubbed NIO support" mean?

Is my only option to stub NIO from C source code and recompile DLL? Since I'm not good at C programming at all, I'm desperately trying to avoid it.

Is there some other way to call native DLL in Java (not JNI, called DLL's are closed source and JNI incompatible).

The docs are proposing that you write some fake java.nio classes, and put them on the bootclasspath -- and then don't use anything that requires java.nio . You're not expected to modify the JNA source or edit the native code.

JDK 1.3? That's ridiculously out of support , unless you're running on Solaris 8. EOL started seven years ago and was complete when JDK 6 became available on 6-Nov-2006. That's almost five years back .

Personally, I think your efforts would be better spent porting the code to a more modern JDK. JNA is telling you that it requires NIO. I'd heed the call and port away from JDK 1.3.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM