0

I am having trouble with IntelliJ and openjdk 8, I have to work on a project that requires me to use jdk 8, I followed the instructions from the second answer from this thread, cannot resolve symbol javafx.application in IntelliJ Idea IDE. All the jar files work properly but there seems to be a problem with fxml.jar, when I try to run or build the file I get this error message :

Error:(8, 19) java: cannot access javafx.fxml.Initializable
  bad class file: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/javafx-fxml.jar!/javafx/fxml/Initializable.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.

I have searched online for a previous version of the class file but I didn't find anything, what can I do to make it run? I run Linux Mint 19.02 Tina on my laptop, all of my colleagues use windows on their computers and we all use IntelliJ, they do not have any problems, everything runs like a charm.

mario
  • 9,858
  • 1
  • 26
  • 42
Aenarion
  • 1
  • 1
  • 1
    It looks like `sudo apt-get install openjfx` installs JavaFX for Java 10 which will not work with Java 8. There is an open issue to provide openjfx for OpenJDK 8: https://github.com/AdoptOpenJDK/openjdk-build/issues/577. – CrazyCoder Oct 17 '19 at 18:23
  • 1
    Try this workaround https://github.com/AdoptOpenJDK/openjdk-build/issues/577#issuecomment-518819515 It should solve your problem until the github issue is not fixed. – mario Oct 17 '19 at 18:39

0 Answers0