Operating System - OpenVMS
1828274 Members
3502 Online
109975 Solutions
New Discussion

Java compilation question

 
SOLVED
Go to solution
Willem Grooters
Honored Contributor

Java compilation question

Due to building problems on other platforms I have to build my application on VMS - by hand....
Environment VMS 7.3-1 (plain), JDK 1.1.8. PATCH AND UPGRADE ARE NO OPTIONS - have to stick to this environment.

I think I have a problem setting the paths correctly. I tried to describe it in the attachment - it contains a description of the structure, working environment and compilation results.

If someone could explain why the third compilation failed?

Willem
Willem Grooters
OpenVMS Developer & System Manager
10 REPLIES 10
Bojan Nemec
Honored Contributor

Re: Java compilation question

Willem,

I am not shure, because I can not test it, but I think that yours classpath must be:

/sys$common/java/lib/JDK118_CLASSES.ZIP:/dka0/users/me/pps020:.

and not

/sys$common/java/lib/JDK118_CLASSES.ZIP:/dka0/users/me/pps020/nl/lvl1/lvl2/lvl3/framework:.

Java will add nl/lvl1/lvl2/lvl3/framework from jours package name. The first two compiles OK because there are no references to other classes in the package.

Bojan
Bojan Nemec
Honored Contributor
Solution

Re: Java compilation question

Sorry,
I forgot to say that it will be better if you do a set def dka0:[users.me.pps020] and then

javac nl/lvl1/lvl2/lvl3/framework/JOURS_CLASS.java

Probably this way you dont need a special classpath. The logical CLASSPATH will be sufficient.

Bojan
Jan van den Ende
Honored Contributor

Re: Java compilation question

Willem,

you really should be teaching them there (in Meppel, I seem to recognise?) that is is VERY un-VMSsy, because VERY un-transparant and VERY un-tranportable, to be using DKA0: and the likes, as part of any file-id. I know I will be getting this PPS stuff over (we are doing some things with it right now!), and we do not even HAVE DKxnnn!!!
Try teaching them some CONCEALED DEVICE principles!! I now THEY are hiring YOU, so THEY decide, but you DO have some professional integrity that forces you to educate?
(then again, knowing you, and them, you probably tried and had to quit with that or quit with the assignment I guess?)

Oh well, no hard feelings, but I just COULD NOT resist....


DO pay us a visit one time shortly!


Willem, als ik je eerder niet zie, tot DutchWorld.

cheers,

have one one me.


jpe
Don't rust yours pelled jacker to fine doll missed aches.
Willem Grooters
Honored Contributor

Re: Java compilation question

Jan,

Don't worry. I know, it is just a test for my own sake to see how I get the application compiled and running on VMS; on Windows, I have crahes of this Java compiler (Illegal instruction on W2K, Access violation on XP), even worse: was unable to start Netbeans after 1.1.6 was installed on MS Terminal server...What a product (and I don't mean Windows here;-)....

Since I do not have Netbeans on the VMS machine at the customers premises, this _might_ be the quick solution. Nevertheless, if needed I can keep it on the VMS box.

Bojan, I'll check your suggestions first thing in the morning.

Willem
Willem Grooters
OpenVMS Developer & System Manager
Martin P.J. Zinser
Honored Contributor

Re: Java compilation question

Hello Willem,

<> current version of Netbeans will execute with Java 1.1.x, neither on Windows nor on VMS.

To execute Netbeans (which is written in Java itself) you need a current version of Java. What you can do is setup an alternate JDK from within Netbeans to build a specific project using an old Java version. This is described e.g. in the Netbeans book from O'Reilly (I am sure there are other places, I just happen to know this particular reference).

CLASSPATH should look something like
/disk/dir/archive:/disk/dir/archive:.

The trailing . is the current directory and the archive part (foo.zip or foo.jar) can be optional. I think you do not need a trailing slash.

Greetings, Martin
Willem Grooters
Honored Contributor

Re: Java compilation question

Martin,

I know, but I will use the 1.1.6 compiler for compiling my application (accoring the help on cross compilation). Compiled using 1.4 it cannot run using a 1.1.8 JRE.
Actually, it works on Windows: Netbeans, started using 1.4, starts the right compiler on windows (1.1.6) but THAT crashes (due to access violation (XP) or illegal instruction (Win2K)). My own VMS machine cannot handle over 256 Mb of memory momentary (due to some some failing hardware) - so Netbeans is not very userful now on that machine ;-(((

Willem Grooters
OpenVMS Developer & System Manager
Willem Grooters
Honored Contributor

Re: Java compilation question

Well, compilation works!

One problem left, though.
If no .class file exists it will be craeted but the name and extension are in uppercase. I guess that may be a problem when executing in another environment than VMS (since java is (as a Unix-based environment) stricty case-sensitive).
Once a .class exists where name and extention are lowercase, it's ok. That would require either a rename of the file, and I would like to prevent that. Is there a way to force lowercase for filename and extension?

Willem
Willem Grooters
OpenVMS Developer & System Manager
Bojan Nemec
Honored Contributor

Re: Java compilation question

Willem,

Mixed case file names are supported only on ODS-5 disks. But I am not shure that yours version of Java (which is quite old) supports ODS-5 file names (probably yes because of C runtime).
If you have an ODS-5 disk try to move yours Java sources to it and try to compile. Maybe a SET PROCESS/PARSE_STYLE=EXTENDED before compailing will help.

Bojan
Bojan Nemec
Honored Contributor

Re: Java compilation question

On the new versions of Java there is a logical name for mixed case file names.

$ DEFINE DECC$EFS_CASE_PRESERVE ENABLE

Because this is a logical name for DECC it might also work on yours version. The description is there:
http://h18012.www1.hp.com/java/documentation/1.4.1/ovms/docs/user_guide.html#ods5

Bojan

Willem Grooters
Honored Contributor

Re: Java compilation question

See Bojan's suggestions.
I successfully built the application just using CLI intreface (no IDE), not completely in a way I would like it to be done but "java has it's limitations" (to use an understatement).
Willem Grooters
OpenVMS Developer & System Manager