sdc248
asked on
pass arguments to an executable Jar file
Hi:
I have a program that accepts 0 or one argument. I know how to prepare manifest file, export the program to be an excutable jar file, and execute it on command line without taking any argument. But how do I do the same where I do need to pass an arguement?
Thanks.
I have a program that accepts 0 or one argument. I know how to prepare manifest file, export the program to be an excutable jar file, and execute it on command line without taking any argument. But how do I do the same where I do need to pass an arguement?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys. But how do I pass the argument dynamically? I am using a batch file that contains the command and the batch is scheduled to run daily with parameter of yesterday's date. I guess that means I need to add commands that get today's datetime, roll back one day, and use the result as my argument. Unfortunately I am not so familiar with DOS commands. I know this is a bit out of the scope but could you guys help?
check this link http://www.robvanderwoude.com/index.html
ASKER
I've found a work around that doesn't need to do those scriptings. (Good for me!) Thanks.
java -jar XYZ.jar abc def
where XYZ.jar is the name of the jar file and abc & def are the arguments (u can pass any number of arguments u want)