JNA : About
JNA (Java Native Access) is a Java library published under LGPL which provides Java programs easy access to native shared libraries (RTL, System services on OpenVMS) without writing anything but Java code – no JNI or native code is required.
Philippe Vouters has ported JNA 3.2.7 on OpenVMS. Porting means modifying the source code in order to take account of the OpenVMS specifics, writing some examples of JNA use on OpenVMS and creating a PCSI kit.
JNA for OpenVMS needs Java 1.6.0 or later and libffi 3.0.9 . JNA must be installed on an ODS5 volume and has been tested on Itanium.
Contact : Thierry Uso
JNA : Screenshots
Using JNA to call RTL and System services
JNA : Download
ZIP archive containing the PCSI kit of JNA 3.2.7 :
Itanium: free-i64vms-jna-v0302-7-1.zip
This kit is based on the archive jna-sources.tar.gz with the source code modified by Philippe Vouters for OpenVMS.
JNA : Installation
1. Extract the PCSI kit from the ZIP archive
$ SET PROC/PARSE=EXT
$ UNZIP “-V” FREE-I64VMS-JNA-V0302-7-1.ZIP
2. Install JNA in your chosen directory
By default, the installation procedure installs JNA in the SYS$COMMON:[JNA] directory. To install it in dev:[dir.JNA], use the /DESTINATION parameter of the PRODUCT command.
$ PRODUCT INSTALL JNA
or…
$ PRODUCT INSTALL JNA /DESTINATION=dev:[dir]
3. Post installation task
The shareable image JNIDISPATCH.EXE can be built by the link procedure linkjni.com and copied into SYS$SHARE.
$ @linkjni
$ COPY JNIDISPATCH.EXE SYS$SHARE:JNIDISPATCH.EXE
$ SET SECURITY/PROT=(S:REWD,O:REWD,G:RE,W:RE)
On a system with OpenVMS 8.3-1H1, just rename JNIDISPATCH.EXE_IA64-831 to
SYS$SHARE:JNIDISPATCH.EXE.
$ COPY JNIDISPATCH.EXE_IA64-831 SYS$SHARE:JNIDISPATCH.EXE
$ SET SECURITY/PROT=(S:REWD,O:REWD,G:RE,W:RE)
4. Testing JNA
Define the logical name JNIDISPATCH.
$ DEFINE JNIDISPATCH SYS$SHARE:JNIDISPATCH.EXE
Execute a small program from [.examples].
$ java -cp .:../jna.jar “DECC_test”
If jna.jar is copied in the sub-directory [.lib.ext] of JAVA$JRE_HOME_VMS, jna.jar is automatically in the classpath. Don’t forget to adjust it’s protection mask (W:RE).
$ java -cp . “DECC_test”
JNA : History
2010-11-21
JNA 3.2.7 port
To do
??