JPro-one / JPro-Tickets

The right place to report about bugs or suggest improvements for JPro.
https://www.jpro.one
9 stars 4 forks source link

JavaFX12 Error with 2019.1 #25

Open JasonWeise opened 5 years ago

JasonWeise commented 5 years ago

Hi

Now that we have support for Java12 with 2019.1 (which certainly removes the issue in my previous ticket about Java 12), there seems to be an issue supporting JavaFX 12.

When I use JavaFX 12 through my grade.build file as per the following and run with gradlew jproRun:

javafx {
    version = "12.0.1"
    modules = [ 'javafx.controls', 'javafx.fxml']
}

I receive the following error (which loops continuously):

java.lang.AbstractMethodError: Receiver class com.sun.glass.ui.monocle.MonocleTimer does not define or inherit an implementation of the resolved method abstract _pause(J)V of abstract class com.sun.glass.ui.Tim
er.
        at com.sun.glass.ui.Timer.pause(Timer.java:143)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pauseTimer(QuantumToolkit.java:501)
        at com.sun.javafx.tk.quantum.QuantumToolkit.postPulse(QuantumToolkit.java:488)
        at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$12(QuantumToolkit.java:344)
        at com.sun.glass.ui.monocle.MonocleTimer$1.run(MonocleTimer.java:58)
        at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
        at java.base/java.util.TimerThread.run(Timer.java:506)

If I change the javafx config to the following, the error goes away.:

javafx {
    version = "11"
    modules = [ 'javafx.controls', 'javafx.fxml' ]
}

After some Googling it seems others had issues with migrating from JavaFX11 to JavaFX12 with regards to the monocle library (which appears to have been updated to resolve this).

I am guessing this is related to something in jproOne as a regular JavaFX app with this configuration works.

Is there something I can do here for jproOne to work with JavaFX12 as well?

Thanks in advance.

FlorianKirmaier commented 5 years ago

Sorry for the late answer, we've kinda missed this ticket.

Currently, JPro doesn't work with JavaFX12. With the latest version of JPro, we are using a slightly modified version JavaFX, and to make the maintenance easier, we are currently limiting our releases to JavaFX11. We also support 8, but it's not recommended. We currently focus on JavaFX11, because it's LTS. But in the Future, we might also have a release for that latest JavaFX version.

But JPro should just use our modified version of JavaFX11, but for some reason, it doesn't replace the JavaFX version. This would make it easy to configure a build, which uses a newer JavaFX version but still works with JPro because the JavaFX APIs usually don't change. We will investigate why this does not work as supposed.