Have been trying to set up JavaFX with Eclipse on Ubuntu. The code doesn't have an issue importing the javafx classes anymore (this took a LONG time to get working), but when running some simple test code, Eclipse can't seem to find the main class even when I right click on the file directly and run as Java Application.
package mainpackage;
import javafx.application.Application;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.setTitle("Window");
primaryStage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
Error: Could not find or load main class mainpackage.Main
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application