1

In a JavaFX application i want to be able to get to the command line arguments in the fallback class, is there a way to to that?

When i create the JavaFX application i set a custom fallback class

<fx:application id="MyApplication" name="My Application" 
        mainClass="MyApplication.Main" 
        fallbackClass="MyApplication.Fallback"
        toolkit="swing"/>

My custom fallback class looks like

public class Fallback extends javax.swing.JApplet{
    public Fallback(){
        MyApplication.Main.main(new String[]{});
    }
}

The fallback class just start the same application, it works as all JavaFX componentes are used via reflection when available, but don't know how can i get the original args passed to the application.

José
  • 3,041
  • 8
  • 37
  • 58
  • try to use [Application.Parameters](http://docs.oracle.com/javafx/2/api/javafx/application/Application.Parameters.html) class – Katona Aug 29 '13 at 18:10
  • Not sure how this would work, the fallback class is for non JavaFX support and Application.Parameters is part of JavaFX – José Aug 29 '13 at 18:13
  • indeed, then may be this question will help: http://stackoverflow.com/questions/13958318/is-it-possible-to-get-the-command-used-to-launch-the-jvm-in-java – Katona Aug 29 '13 at 18:53

0 Answers0