Open hallvard opened 1 month ago
Hi hallvard!
First, thank you for mentioning this issue. It's, of course, important for us to support all reasonable JavaFX environments.
In my first analysis, I noticed a more fundamental issue. There are solutions to work around the "Application" issue. However, the real issue is that Quarkus "reloads" all classes using a new Classloader. JavaFX is loaded twice. Quarkus uses it's reloaded JavaFX Classes. JPro uses the original JavaFX Classes. The solution would probably be to "replace" the current JPro Startup Mechanism, and move it into the Quarkus Classloader.
It probably sounds more complicated as it is.
@hallvard We just made a prototype working. It required some changes in JPro itself. We have to clean it up. Then, we can make it available as a sample We can probably give you something at the beginning of next week.
Wow, that was quick! Looking forward to testing it!
Btw, here's the app I wanted to try out: https://github.com/hallvard/wb-fx
Small minimal "Quarkus JPro Helloworld": https://github.com/FlorianKirmaier/jpro-quarkus
But there are currently quite some issues. Quarkus does a LOT of Classloader and deployment magic. It also has it's own dependency resolver. In this version, only running works, deployment doesn't work now.
It also only works with the special JPro Version used in this example.
It is also worth noting that you have to change the JavaFX version in the pom to the one JPro uses.
I quickly tested your application. Seems to work.
I'm trying out Quarkus as a platform for Java desktop apps. It has an extension named quarkus-fx, that allows the quarkus platform and javafx application to work together. However, in such an application the main application class must implement QuarkusApplication instead of subclassing of javafx' Application class, so cannot be started by jpro:
It's the FxApplication (library) class that extends Application, not WbApplication.
Quarkus and quarkus-fx is an interesting platform, so perhaps jpro could support it?