title: How to implement start(Stage) method from another class in Java?
body: <p>I've run into a problem where I receive the error: start(Stage) in GUIDirectory cannot be applied. </p>
  
  <p>I basically want to give the user the ability to choose between a Terminal Version of my program, and a GUI version of my program. 1 for Terminal, 2 for GUI. I can easily implement my code when I call the terminal version:</p>
  
  <pre><code>if(option == 1){
      myTerminal.printMenu();
  }
  </code></pre>
  
  <p>Easy peesy. Once the user presses 1, it grabs the code and runs it no problem.</p>
  
  <p>However, when I have this code: </p>
  
  <pre><code>if(option == 2){
      myGui.start();
  }
  </code></pre>
  
  <p>It throws a fit, this is my Main constructor:</p>
  
  <pre><code>public Main(){
      Scanner input = new Scanner(System.in);
      int option = input.nextInt();
  
      if(option == 1){
          myTerminal.printMenu();
      }
      if (option == 2){
          myGui.start();
      }
  }
  </code></pre>
  
  <p>This is the GUIDirectory Class:</p>
  
  <pre><code>public class GUIDirectory extends Application {
  
      public GUIDirectory(){}
  
      public void start(Stage primaryStage) throws Exception {
          Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
          yada yada yada ...
  </code></pre>
  
  <p>All I want to do is give the user access to launch the GUI version by pressing 2. Is there no way to implement this? Or should I just simply create two separate programs?</p>
  
  <p><strong>SOLVED</strong> credit to iMan. </p>
  
  <pre><code>if(option == 2){
      try{
          myGui.launch(GUIDirectory.class);
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>I'll have to look further into why this works, but thank you again guys! </p>