Operating System - OpenVMS
1828221 Members
2153 Online
109975 Solutions
New Discussion

Re: Comman line argument in JAVA on VMS

 
Ravi Chandel
New Member

Comman line argument in JAVA on VMS

hi,
i am using the VMS operating System. I am running Java Application on it. I have created a small program which reads three command line arguments and uses them in program.

Can anyone kindly tell me, how can i declare the command line arguments ?
i need the syntax.

the code is running fine on windows.

java "read" login password filename

i am using the above mentioned command but its not working.
3 REPLIES 3
Steven Schweda
Honored Contributor

Re: Comman line argument in JAVA on VMS

And "it[']s not working" means what, exactly?

Guess-work begins here.

You may need to quote command-line arguments
if the case is important. If that's the
problem, SET PROCESS /PARSE_STYLE = EXTENDED
might help, but I don't use Java enough to
know if that'll do everything you need.
Martin Vorlaender
Honored Contributor

Re: Comman line argument in JAVA on VMS

Ravi,

it should be the same commandline argument passing as under Windows (String[] args).

Please elaborate on what's not working as expected.

cu,
Martin
P R Stone_1
Advisor

Re: Comman line argument in JAVA on VMS

Try the following:

$ define java$classpath -
path_to_jar:my_jar.jar, -
path_to_jar:log4j_1_2_8.jar, -
path_to_jar:commons-logging_1_0_3.jar, -
path_to_jar:commons-cli_1_0.jar, -
path_to_jar:commons-pool-1-2.jar, -
path_to_jar:commons-dbcp-1-2-1.jar, -
path_to_jar:commons-beanutils_1_7.jar, -
path_to_jar:commons-digester-1_7.jar
$ !
$ on error then goto error_point
$ !
$ java -cp $java$classpath -
"myprogram.main" -
--spring "''myconfig_xml'" -
--update -
--outcsvfile "''my_file'.csv_tmp" -
--date "''use_date'"
$ !
$ set noon
$ !

We use commons-cli in the Java to read in command line parameters and the above gives examples of different uses.

NB the above is only an example not a working system.