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
There is an interesting discussion of JavaFX and command line parameters in this blog post: Exploring JavaFX 2 - Accessing application parameters, in which the author recommends that you "let Application.getParameters() to act a transporter and ask Apache Commons CLI to take the main work" by which he means just get the raw parameter data rather than the parsed parameters:
getParameters().getRaw().toArray(new String[getParameters().getRaw().size()])
This translates the parameters to a JavaFX example into the same kind of String array you get from a command line app, and you can then handle the parameter parsing using a common function.
If you can't use Apache Commons CLI in your project, you could implement a basic parameter parser for your app yourself which handles in a common function the parsing based upon the parameters retrieved from a getParameters().getRaw().toArray
call (in JavaFX mode) or the main()
args passed to your app (in command line mode).