Hi
Vor einem halben Jahr programmierte ich die Spiele 2048, snake und minesweeper und veröffentlichte diese (alles funktionierte).
wenn ich jetzt snake oder 2048 in Intellij starten möchte, bekomme ich eine Fehlermeldung.
Error: JavaFX runtime components are missing, and are required to run this application
Wüsste jemand woran da liegt? villt wegen updates?
Fehlermeldung
In der Diskussion
Kommentare (3)
- Beliebt
- Neu
- Alt
Du musst angemeldet sein, um einen Kommentar schreiben zu können
Richi
25 August 2021, 21:31
Is it still worth learning javafx?
0
Richi
25 August 2021, 21:27
Thanka I try it tomorrow
0
Guadalupe Gagnon
25 August 2021, 19:41
This is because Oracle dropped support for JavaFX... I believe that occurred with Java 15 but it could have been earlier. So you are left with 2 options:
#1 go to the website for Java FX and follow the instructions to set the VM options in Intellij to allow it to preload the JavaFX components needed to launch
#2 or what I have been doing:
first create a public static method in the Game2048 class, i called mine startProg() like this:
Next create a class in the program folder of the game and add a main() for it like this:
Both the method name from step 1 and class name from step 2 are inconsequential and you can call them whatever you want. Just make sure that you are calling the created method in the main method. This works but you won't be able to publish the game like this. 0