Can't run JavaFx code from Eclipse

后端 未结 3 696
情书的邮戳
情书的邮戳 2021-01-06 21:16

I found this code on the site oracle but I can\'t launch with Eclipse it\'s saying me \"Unable to launch\". I have installed JDK 8 but it doesn\'t work...

Anybody h

3条回答
  •  长发绾君心
    2021-01-06 21:33

    Eclipse has a problem detecting that JavaFX applications can be launched without a main method in Java 8 - a workaround is to add this yourself

    public static void main(String[] args) {
        launch(args);
    }
    

提交回复
热议问题