JavaFX mit javac compilieren funktioniert nicht

Hallo,
ich bin Simon und habe unter Windows schon ein paar Kleinigkeiten mit JavaFX gemacht. Nun benutze ich Linux. Leider kann ich dieses Programm mit javac nicht compilieren:

Java:
import javafx.application.*;
import javafx.stage.*;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.layout.*;
public class Stage extends Application {
  public static void main (String args[]){
    launch(args);
  }

  @Override
  public void start(Stage stage)throws Exception{
    GridPane root = new GridPane();
    Scene scene = new Scene(root, 600, 600);
    stage.setScene(scene);
    stage.show();
  }
}

Dabei erhalte ich folgende Fehlermeldung:

Code:
tage.java:6: error: Stage is not abstract and does not override abstract method start(javafx.stage.Stage) in Application
public class Stage extends Application {
       ^
Stage.java:11: error: method does not override or implement a method from a supertype
  @Override
  ^
Stage.java:15: error: cannot find symbol
    stage.setScene(scene);
         ^
  symbol:   method setScene(Scene)
  location: variable stage of type Stage
Stage.java:16: error: cannot find symbol
    stage.show();
         ^
  symbol:   method show()
  location: variable stage of type Stage
4 errors

Weiß hier jemand woran das liegen könnte?
 

Neue Themen


Zurück
Oben