Upgrading e(fx)clipse plugin based app to OpenJDK and OpenJFX [message #1823514] |
Fri, 27 March 2020 21:57  |
Eclipse User |
|
|
|
We are in the process of updating an app we originally developed under Oracle Java and JavaFX. This app is plug-in based versus feature based. The app is composed of about 10 plug-ins, only one has a JavaFX UI. We target the distribution for macOS, Windows, and occasionally Linux..
Anyways, we started down the path of getting the whole application updated to use Eclipse 2020-01 and JDK 13. We now have the app updated and working minus the JFX enabled plugin (however our tycho build is another problem, but we can sort that out later).
Now we are trying to tackle the JFX plug-in. One of the issues I'm running into is the javafx.swt module. Not sure what the best way to bring this into the project as it's platform dependent.
I found Tom Schindl's blog post here which describes the basic process. https://tomsondev.bestsolution.at/2020/01/28/setting-up-efxclipse-rcp-development-for-java11-and-pde/
The one sticky point is I'm not quite sure how to leverage the p2 repository for for OpenJFX 11 that Tom has hosted at bestsolution.at. When I add the modules into the Target Platform, the JAR files seem to get bundled, however only as files, not as libraries, so none of the classes seem to be imported into the platform. Added these modules as plug-in dependencies adds the files into the plug-in's library References, however when I dig into the library, all I see is the raw OpenJFX jar file and none of the classes.
So I'm unclear how to get OpenJFX, specifically the javafx.swt, which is platform dependent into the build. Ideally I'd like to use the latest OpenJFX, but can use OpenJFX 11 if that's all that works.
Thanks for any advice.
|
|
|
Re: Upgrading e(fx)clipse plugin based app to OpenJDK and OpenJFX [message #1823517 is a reply to message #1823514] |
Fri, 27 March 2020 23:17   |
Eclipse User |
|
|
|
So we are talking about compile time problems right? The compile problems in Eclipse are solved by the installation of the efxclipse plugins and pointing to the openjfx-sdk lib folder. If you use our rebundled openjfx libs there are no package import/require bundle is needed. At runtime efxclipse-osgi will spin up a jpms-layer and installs the rebundled java-modules. So those osgi bundles are pure deployment artifacts hence they do not export any packages.
|
|
|
Re: Upgrading e(fx)clipse plugin based app to OpenJDK and OpenJFX [message #1823518 is a reply to message #1823517] |
Sat, 28 March 2020 00:32   |
Eclipse User |
|
|
|
It's a problem with both, I think.
I have 3 scenarios:
1. Development and Debugging - I need to have OpenJFX classes available as a library. I have multiple developers on different platforms - I really just want them to be able to checkout the source and be able to start building. Having to fiddle with a bunch of Java and Maven dependencies always causes issues.
2. CI/CD - our Jenkins system needs to be able to compile, test, and package. Using tycho currently - but probably needs to be completely revamped.
3. Deployment: end users need minimal prerequisites and configuration to install.
I guess what I'm confused by is if I'm using the target platform that contains the JavaFX dependencies, why aren't the classes just exported like every other plug-in. What I'm missing is how the rebundled openjfx libs end up on the classpath, because those should show up since they are part of the target platform, and resolve, but I don't see that happening.




|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03550 seconds