0

I have problem with JavaFX. My jdk version is OpenJDK version "1.8.0_222" and javac 1.8.0_222. When i start JavaFX app i have this error .

Error:(3, 26) java: cannot access javafx.application.Application
  bad class file: /usr/share/openjfx/lib/javafx.graphics.jar!/javafx/application/Application.class
    class file has wrong version 54.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
2
  • Somewhere you've compiled with Java 12 but you're running with Java 8. Do you have another environment on you machine? JavaFX 13 requires Java 11 so you'll not be able to use Java 8 either way.
    – stdunbar
    Commented Nov 24, 2019 at 18:38
  • I have only installed Java 8. What i can do i will use another GUI framework? I must have Java 8.
    – Dawid
    Commented Nov 24, 2019 at 18:49

1 Answer 1

0

you are using a jdk version not compatible with your openjfx version. You can update the openjdk version at least to version 10 or check you are using openjfx version 8 at most.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.