Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I pass a certain value to the standalone application as a command line argument?

0
Posted

How can I pass a certain value to the standalone application as a command line argument?

0

To pass command line arguments to your standalone application you should simply specify the space-separated list of argument values (in the case of Windows, you type it in the application’s .bat file, after the enumeration of all required JAR files), e.g.: 25 107.8 “useful text” Or, in the case you are the author of this standalone application, you can specify these values in the advanced Command-line arguments property of the experiment. To capture the passed values in the model, please use the method getCommandLineArguments() of an experiment. This method returns an array of Command-line Arguments passed to the standalone application. To get, say, the first argument from the list, you can call getCommandLineArguments()[0], to get the second one – getCommandLineArguments()[1], etc. Please note that the method will return the values of type String. You may parse numbers from String using these methods: Integer.parseInt(), Double.parseDouble() This “capturing code” can be placed in e.g.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.