title: Using command line arguments in Java with JavaFX
body: <p>I have the following code:</p>
  
  <pre><code>public class Main extends Application {
  
    @Override
    public void start(Stage primaryStage) throws Exception{
        Parent root = FXMLLoader.load(getClass().getResource("hive.fxml"));
        primaryStage.setTitle("Hive-viewer");
        primaryStage.setScene(new Scene(root, 1600, 900));
        primaryStage.show();
    }
  
  
    public static void main(String[] args) {
        launch(args);
    }
  }
  </code></pre>
  
  <p>I want to know how you would use a file (given with the command line) in the Controller or in a method in the Main class</p>