How to take parameters when opening application

edited October 2013 in How To...

In java a jar file can take parameters through the main() method ie:

<code>public static void main(String[] args) {
if(args != null){System.out.println(args[0]);}

However the sketch crashes if you add parameters to setup() and putting in a main() method will close the program in a few seconds. I noticed when processing saves your sketch to a .java file it puts in a check for parameters but does nothing with them. How can I access the launch parameters?

Also the open() method allows you to pass arguments to a program, so this must be possible.


Sign In or Register to comment.