1753835 Members
7606 Online
108806 Solutions
New Discussion юеВ

Java Problem using "-V"

 
Mel Brender
New Member

Java Problem using "-V"

I have the following problem using Java 1.4.2 on OpenVMS 7.3-1. I am running the following command:


$ java "com.app.cmdlin.AppCmd" lck -l -pwdfile SYS$COMMON:[HOME]PASSWORD.TXT -p user@10.20.23.20:33333/CTS/CTS/MVII FILENAME.DAT

and this works fine.

I will need to input much longer command lines, so I wrote the portion of the line that follows тАШjavaтАЩ into a file called command.dat:

" com.app.cmdlin.AppCmd " lck -l -pwdfile SYS$COMMON:[HOME]PASSWORD.TXT -p user@10.20.23.20:33333/CTS/CTS/MVII FILENAME.DAT


I then executed the following:

$ java "-V" command.dat

This time I get the following error message:

Exception in thread "main" java.lang.NoClassDefFoundError: "com/app/cmdlin/AppCmd" lck -l -pwdfile SYS$COMMON:[HOME]PASSWORD/TXT -p user@10/20/23/20:33333/CTS/CTS/MVII FILENAME.DAT

Note that the periods in the class name, password file parameter (PASSWORD.TXT) and even the IP address have all been replaced with slashes. I read through the User Guide that came with the SDK, but none of the notes there seem to relate to this problem. Can you tell me how to succeed with the java тАЬ-VтАЭ command?

Many th
5 REPLIES 5
Ian Miller.
Honored Contributor

Re: Java Problem using "-V"

parhaps it could be that you have to set one of the CRTL feature logicals that affect parsing of command lines?
____________________
Purely Personal Opinion
Bojan Nemec
Honored Contributor

Re: Java Problem using "-V"

Mell,

Try to remove quotes from the class name:

com.app.cmdlin.AppCmd lck -l -pwdfile SYS$COMMON:[HOME]PASSWORD.TXT -p user@10.20.23.20:33333/CTS/CTS/MVII FILENAME.DAT


The quotes are required in the command line, because DCL change all nonquoted characters in uppercase and than the C runtime (in which java is written) changes all nonquoted characters in lowercase.

Bojan
Mel Brender
New Member

Re: Java Problem using "-V"

Thanks both of you for your help.

There are so many logicals involved I hoped to avoid an endless trial-and-error approach.

I tried removing the quotes from the class name and that did not help. However, it forced me to focus on the error message itself instead of the mangled filenames. I now realize I'm getting a NoClassDefFound error. That's got to be a clue!
Antoniov.
Honored Contributor

Re: Java Problem using "-V"

Mel,
replacing dot by slash sounds like filename conversion. Look at this:
vms filename -> [dir1.dir2.dir3]file.ext
unix filename -> dir1/dir2/dir3/file.ext
It appears parser try to convert input parameters in unix syntax.

Antonio Vigliotti
Antonio Maria Vigliotti
Willem Grooters
Honored Contributor

Re: Java Problem using "-V"

Just run into the manual at http://h18012.www1.hp.com/java/documentation/1.4.2/ovms/docs/user_guide.html.

There is some discussion on the subject, I think. Look for the string "Using White Space Within "-V" Data Files".
This document also explains a lot of the logicals.


HTH

Willem
Willem Grooters
OpenVMS Developer & System Manager