For my school project I am creating a game like Bad Apples for iPhone (not my personal choice but it isn\'t the problem).
The game needs to have two versions, the first
If you are using JavaFX you can use the getParameters method in the Application class (please note, not in the constructor though), it handles both parameters from the command line as well from the jnlp file!
public final Application.Parameters getParameters()
Retrieves the parameters for this Application, including any arguments passed on the command line and any parameters specified in a JNLP file for an applet or WebStart application. NOTE: this method should not be called from the Application constructor, as it will return null. It may be called in the init() method or any time after that.
http://docs.oracle.com/javafx/2/api/javafx/application/Application.html#getParameters()
For further details see the documentation for the returned object: http://docs.oracle.com/javafx/2/api/javafx/application/Application.Parameters.html
It handles both named and unnamed (and can always get the raw parameters of course).
Named parameters you get as a
Mapfrom callinggetNamed()and include those pairs explicitly specified in a JNLP file. It also includes any command line arguments of the form: "--name=value"Unnamed parameters you get as a
Listby callinggetUnnamed()Are the simple ones you already handle today in your code, meaning, that the named parameters, that is the parameters that are represented as pairs, are filtered out from thisList.