2
votes

I have created a javafx project using java 9.0.4. The code can be compiled and works. and I can use the Internal sceneBuilder.

but when I import an element from the Jfoenix 9.0.1 library I can't use the sceneBuilder anymore.

I get this error:

java.lang.UnsupportedClassVersionError: com/jfoenix/controls/JFXButton has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0

also I've added the library to the project structure.

Is there a way to change the version of Java Runtime that this part uses?

2
can you not change your code to use Java 8 instead? to be able to use said component? - blurfus
I can use an external scenebuilder ... but I was wondering if there's a way to solve this - TheStudent

2 Answers

0
votes

It's not possible to change the version of the library except for only by using an older version of it. What you can do however is you can update your runtime to Java 9

0
votes

You can consider using an external scene builder. Make sure you are using the correct version of scenebuilder with the correct version of Java. Thereafter in your IntelliJ, press Ctrl+Alt+S -> Language and Framework -> JavaFX and link it to your SceneBuilder, you can then import your library.

Also make sure your project library, JFoenix library version is both 9.x