Discussion ClosedThis discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one,click here.
how to run a java .class file with command line arguments from the console
Posted 2014年1月10日 GMT+1 16:411 Reply
Please login with a confirmed email address before reporting spam
Hello,
How can I pass (command line) arguments to a .class file when starting it from the console? The public static void main(String[]) method of my class parses its arguments to set parameters of the device being simulated, and to determine what simulation tasks to perform. When called from within the desktop (i.e. no arguments given), it pops up a window to ask the user for these arguments - but as the next step I would like to run this class from the command line, specifying all parameters and tasks as command line options. Can this be done?
I have 4.3b
Thank you
Daniel
[edit: I know how to pass command line args to a java program, but I guess with comsol I do not run these .class file as "java myclass.class arg1 arg2...", but with comsolbatch]
How can I pass (command line) arguments to a .class file when starting it from the console? The public static void main(String[]) method of my class parses its arguments to set parameters of the device being simulated, and to determine what simulation tasks to perform. When called from within the desktop (i.e. no arguments given), it pops up a window to ask the user for these arguments - but as the next step I would like to run this class from the command line, specifying all parameters and tasks as command line options. Can this be done?
I have 4.3b
Thank you
Daniel
[edit: I know how to pass command line args to a java program, but I guess with comsol I do not run these .class file as "java myclass.class arg1 arg2...", but with comsolbatch]
1 Reply
Last Post 2014年1月10日 GMT+1 16:49