Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

using RTL routines and system services from java

arik bekovich
Occasional Visitor

using RTL routines and system services from java

hi

does anyone have an example to how i can use
RTL (like lib$spawn) routines in java on openvms? and which packages need to be imported to use them?
i'm using java 1.4.2 SDK on OpenVMS 7.3-1

thanks

arik
4 REPLIES
Bojan Nemec
Honored Contributor

Re: using RTL routines and system services from java

Arik,

You can write native C functions which will be a wraper to lib rtl routines.

There is a package called J2VMS which has all the VMS system services and LIB$ routines.

http://www.j2vms.co.uk/

I have only tried some examples so I cant say you how it works.

Bojan
Michael O'Connor_8
Occasional Visitor

Re: using RTL routines and system services from java

The link to http://www.j2vms.co.uk/ now seems to be a travel agent. Would anyone know where I can find this package, or perhaps email a copy to me?

Mike
Willem Grooters
Honored Contributor

Re: using RTL routines and system services from java

Like Bojan saud: make C toutines that to the interfacing, and call them from Java code. The user guide ( http://h18012.www1.hp.com/java/documentation/1.4.2/ovms/docs/user_guide.html ) tells you how to do that (Chapter on Interfacing with non-Java Code).

But first ask yourself WHY you would use Java at all. Since you plan to use VMS-specific code, you make your code non-transportable to other platforms. Consider to use a native language (C++, but there are other object oriented langiages ported to VMS (Modula2, Ruby (i think)) that are outrun Java by far in terms of overall performance. Using Java for a VMS-only application is like shooting a midget - with a cannon.
Willem Grooters
OpenVMS Developer & System Manager
Michael O'Connor_8
Occasional Visitor

Re: using RTL routines and system services from java

We are developing an application with a GUI that will have to run on DECWindows Motif, Windows and Linux. Among other things, this GUI will expose a legacy application on our OpenVMS Alpha system, and Java is the cannon of our choice ;-)

I can write the system services calls in C, then use JNI to call the C routines, but I wanted to see the J2VMS package, as it speeds up the learning process, and I possibly won't have to re-invent too many wheels.