2

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?

TheStudent
  • 41
  • 1
  • 6

2 Answers2

0

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

ACV
  • 9,964
  • 5
  • 76
  • 81
  • thanks, but how do I do that? I've already set the default jdk version to 9.0.4 and I've done all the necessary changes in the project structure, but that doesn't seem to be enough. Is there some other option to set the java runtime version of the scenebuilder? – TheStudent Mar 24 '18 at 01:11
  • what do you mean by internal scene builder? In which IDE? – ACV Mar 24 '18 at 01:20
  • Intellij IDEA 2017.3.2 – TheStudent Mar 24 '18 at 03:02
0

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

zzdhxu
  • 379
  • 6
  • 22