Operating System - OpenVMS
1752557 Members
4332 Online
108788 Solutions
New Discussion

Java/C/COMMON/VMS if interested with

 
Ph Vouters
Valued Contributor

Java/C/COMMON/VMS if interested with

Dear VMS reader,

 

If interested with, this OpenVMS document shows a way to share an array of integers between a Java/JNI and a C programs via a installed VMS common. The code has been tested and produces expected results on VMS IA64 V8.3-1H1. Some Linker's options used in this document may have to be fitted for a run under an Alpha VMS computer.

 

You ought to achieve the same results without a JNI but instead using Java Native Access (JNA). Your Java code will then be 100% pure Java coded.  JNA has been ported to OpenVMS and is available under J2SE V6.0.

 

You will find this technical paper at http://vouters.dyndns.org/tima/OpenVMS-Java-C-Sharing_data_between_Java_and_C_via_a_COMMON.html

 

In the hope this can give some of you ideas or a solution provided you need implement such type of solution.

Philippe

3 REPLIES 3
Ph Vouters
Valued Contributor

Re: Java/C/COMMON/VMS if interested with

The JNI approach in previous URL link replaced by a Java Native Access (JNA) approach. For your curiosity.

http://vouters.dyndns.org/tima/OpenVMS-Java-JNA-C-Sharing_data_between_Java_and_C_using_JNA.html

Ph Vouters
Valued Contributor

Re: Java/C/COMMON/VMS if interested with

For those programming in Python/VMS, here are the two Java solutions translated to Python:

http://vouters.dyndns.org/tima/OpenVMS-Python-C-Sharing_data_between_Python_and_C_via_a_COMMON.html

and

http://vouters.dyndns.org/tima/OpenVMS-Python-C-Sharing_data_between_Python_and_C_using_ctypes.html

If this can satisfy someone, I shall be glad.

Philippe

 

Ph Vouters
Valued Contributor

Re: Java/C/COMMON/VMS if interested with

If interested with and still in the same spirit using portable code. An extension of this study using common  Linux/OpenVMS bash scripts.

Java/JNA solution:

http://vouters.dyndns.org/tima/OpenVMS-Linux-Java-JNA-C-Sharing_data_between_Java_and_C_using_JNA.html

Python/ctypes solution:

http://vouters.dyndns.org/tima/OpenVMS-Linux-Python-C-Sharing_data_between_Python_and_C_using_ctypes.html

 

In the hope this will interest some of you.

Philippe