Is jme in javafx still possible?
(I hope I am in the right cathegory, and sorry for my english, I’m french. )
After some research on the web, and on the forum.
I want to know if it’s possible to embed JME into a JavaFX Pane ? Or if a feature is planned for the project ?
I’ve found some codes and trying to integrate my jme render inside a JPanel and inside a SwingNode.
But nothing seems to works, (old posts)
I haven’t any render.
I share with you my actual work:
Code Main Class`public class Main extends Application …
I tried to build it on Eclipse + LibericaJDK 11 and got the following error:.
The type com.sun.javafx.embed.EmbeddedStageInterface is not accessible
Access is probably prohibited by JPMS. If so, is jme in javafx already impossible? It affects the design of my application.
javafx in jme still seems to work, but not jme in javafx.
A JavaFx wrapper to allow using JavaFX in jmonkey - with an appstate to easily control scenes. Support for loading fxml files from the resources directory or coding your own is also added to simplify the whole process. Also included is a PropertyPanel - exactly the same as in Lemur.
just attach a JavaFxGuiState to the state manager and set a scene using the state.
// at some point
An example …
Thank you for reading.
I’m quite certain jmonkeybuilder put jme in a javafx pane, though you’ll have to sift through the code to see how he did it. I’ve only ever put jme in a swing Panel.
At LibericaJDK 11 + compiler compliance level 10, I failed to build the jmonkeybuilder. This error is most likely due to JPMS.
The type com.sun.javafx.iio.ImageFrame is not accessible
jmonkeybuilder might have some useful information, but you might just conclude that JPMS made jme in javafx impossible. The loss of access to javafx’s internal packages can mean that.
This method did not solve this problem.
jmonkeybuilder 1.8 .0 .msi works. I think it’s self-contained. This means that it works with certain versions of the JDK.
I will give up jme in javafx.
Some people see an obstacle and see it as a challenge. Others a reason to give up. I’m as certain as I can say without actually writing it myself that it’s entirely possible.
Access restrictions are eliminated if you override the JPMS module access rules at runtime. I’m using JavaFX in jME (not the other way around), and I have the following section in the run task of my build.gradle file:
jvmArgs = [
You may need to open a different set of packages for jME in JavaFX, but it’s the same process.
Is it worth the effort anyway? Maybe it’s possible, but what do you gain embedding JME? My tests in the past always had far worse performance doing this, so that makes it even less interesting, unless I’m missing the point.