JavaFX Scene Builder sources 53.0

Answered

Hello,

I am using IDEA Ultimate. I want to build a JavaFx application with a library that has a class file version of 53., but idea with its bundled jre only supports 52.0.

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

It is clear that the issue is that I run IDEA with an older Java version. When I manually try to point the idea.sh to my OpenJdk 11 home my project does not load properly. I cannot see any sources at all.

If I import the lib in a version that is compiled for java8, I get some classnotfoundexceptions (I found out that these classes are from jdk8), but i want to run my project with jkd11.

Is there a way to run scene builder/idea with a certain jre (53.0) to get the preview of scene builder run properly?

BR

Alex

0
4 comments
Avatar
Permanently deleted user
Official comment

It's sad to disappoint you but at the moment it's not possible to run the embedded SceneBuilder along with Java 11.

I hope that at some point IDEA will be able to run on Java 11 which is necessary to resolve the issue. However it's a bit difficult to estimate the time frame for that.

For the time being the only way to preview .fxml files that use custom widgets built with Java 11 is to open such .fxml in stand-alone SceneBuilder. And you'll need to add your custom widgets' .jar to the SceneBuilder's library to make it work.

What IDE version do you use? The latest versions support Java 9 as IDE runtime: https://youtrack.jetbrains.com/issue/IDEA-145206

What error do you see when trying to run it?

0
Avatar
Permanently deleted user

I see a similar issue with my fxml code. Using x64 versions. Working on Windows 10. Scene Builder 11, IntelliJ 2018.3.4, Java 11.0.2, JavaFX 11.0.2 with ControlsFX 9 custom build of these controls.

There's an article that explains this issue in more detail: https://stackoverflow.com/questions/53509991/use-scenebuilder-with-javafx-11-in-idea with options to address it.

But when is JetBrains going to support with Scene Builder 11 or even 10 out of the box?

Thanks

0
Avatar
Permanently deleted user

My IDEA version is: 2018.3

I added 

--permit-illegal-access
--add-exports

to my idea.vmoptions. Same issue occurs. I can only see .iml, pom.xml, no external libraries, no sources, project settings-> modules is empty. Only message in the event log: Please consider switching to the bundled Java runtime that is better suited for the IDE (your current Java runtime is 10.0.2+13 by Oracle Corporation).

Warnings from idea.sh startup:

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.intellij.ide.ClassUtilCore to field sun.net.www.protocol.jar.JarFileFactory.fileCache
WARNING: Please consider reporting this to the maintainers of com.intellij.ide.ClassUtilCore
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
WARN: BashSupport not loaded: until build 171.SNAPSHOT < IU-183.5153.38
WARN: Grammar-Kit not loaded: until build 173.SNAPSHOT < IU-183.5153.38

BR

Alex

0

Please sign in to leave a comment.