JAR executable and parameters
in
Integration and Hardware
•
1 month ago
Hi.
I use Processing 1.5.1 in Windows to produce some PNG images and then call exit() as last command in setup().
The sketch is then compiled as applet and executed from command line with
> java -jar sketch_name.jar
This works.
What if I want to read some command line arguments to specify PNG's parameters (such as filename, size, etc) inside the sketch? I saw that args[] is always long 1 and contains the jar filename. Extra arguments are lost...
I would like to be able to call the applet with
> java -jar sketch_name.jar param1=value1 param2=value2
I tried -Dproperty=value but system property values don't look like working with this syntax in Processing.
Any hint?
Thank you in advance
Alex
I use Processing 1.5.1 in Windows to produce some PNG images and then call exit() as last command in setup().
The sketch is then compiled as applet and executed from command line with
> java -jar sketch_name.jar
This works.
What if I want to read some command line arguments to specify PNG's parameters (such as filename, size, etc) inside the sketch? I saw that args[] is always long 1 and contains the jar filename. Extra arguments are lost...
I would like to be able to call the applet with
> java -jar sketch_name.jar param1=value1 param2=value2
I tried -Dproperty=value but system property values don't look like working with this syntax in Processing.
Any hint?
Thank you in advance
Alex
1