-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move to Java 11 ? #1033
Comments
BTW: The reason for the Gradle upgrade was my plan to add Java 11 support ;-) I already have a local branch which builds and runs on Java 11. Now that the Gradle upgrade works I will continue on that. The major difference is that the JavaFX libraries are not bundled with the JDK anymore so I used the javafx gradle plugin... |
That's great ! Tip: there are four (4) changes that can be done with moving to Java 11:
|
It's really a good step forward. Though, I believe the worst part about RichTextFX now are its dependencies. Abandoned and not modularized. Switching to Java 11 usually means that lib is fully compatible with Java modules, but until all its dependencies are also modularized it's not true. So, switching to Java 11 you'll lose Java 8 users, but won't make Java 11+ users life better. Imho, dependencies should either included to the RichTextFX codebase (UndoFX) or modularized as it is (the rest of them) first, then switch. In that case it definitely would be 1.0.0 (semantic versioning rules). |
There are several issues with Java 11: The first is that JavaFX is not shipped with the JDK anymore. This needs to be fixed first in order to be able to build RichtextFX on Java 11 at all. Once this works we can work towards modularization - essentially there must not be any modules at all (The JPMS supports non-modularized libraries along with modularized ones), but this is probably what you mean with "won't make Java 11+ users life better". Also, the question about Java 8 is a good one: Do we really want to drop support for Java versions < 11? I would say "yes", simply to reduce the complexity. Also, Java 8 (the LTS version prior to Java 11) is EOL since 2+ years. Do we have an idea of how many applications which use RichtextFX are still on Java 8 (or 9 / 10)? |
If you are interested, my work in progress is available at https://github.com/afester/RichTextFX/tree/jdk11 - building the source and running the demos works on JDK 11. This has the adjusted gradle build files, especially the additional "javafx" plugin which pulls the JavaFX jars from the maven repository (since they are not bundled with the JDK anymore). Also I moved the "jdk9" specific sources back to the main source directory. I did not take any care of still supporting some kind of Java 8 / Java 9 build so far - as of now, this will only work on Java 11. |
That's great, thanks :-) |
Actually you can see on github who uses RichTextFX. Github seems to think another repo is the artifact definition: https://github.com/lgu-lab/javafx-richtextfx/network/dependents |
Considering that javafx17 and jdk 17 are both LTS, I think using java 11 would be a minimum now |
I have completed most of the Java11 tasks and pushed the code to my personal branch at https://github.com/afester/RichTextFX/tree/jdk11.
I still would like to add the jlink task, and then prepare the branch for a pull request. |
@afester Thanks a stack for this Andreas, I really appreciate it. With regards to bullet point 5 and fat jar files, I'm using the fat jar without issues with Java 11 and JavaFX. |
For jlink I can recommend the following plugin https://badass-jlink-plugin.beryx.org/releases/latest/ |
Interesting - I never got that to work, and my theory was that the JavaFX jar files always need to be on the module path Are you using some special |
@Siedlerchr Thanks, thats exactly the one I already used in another project and which I plan to use here also :-) |
@afester I have never encountered this issue when running a JavaFX fatJar application across varying versions (Java 8, 11, 14, 16). The only message I've ever gotten was:
Despite the warning the target application runs just fine. I think that at the time of speaking "unsupported" does not mean "it does not work" but rather "we recommend doing it modularly". This is backed up by what Johan Vos says in the thread: https://bugs.openjdk.java.net/browse/JDK-8256362?focusedCommentId=14381344&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14381344 |
@afester So when running with JavaFX as a separate library from the JVM, (say in folder jfx) I specify the following parameters:
or I set the following environment variable:
and then just run with: Nowadays I use JVM's bundled with JavaFX like Azul or BellSoft in which case I just launch without any special parameters or environment variables. In all cases my application's jar file MANIFEST contains a standard |
I did some additional investigation with this, and it seems that
works, provided that
UPDATE:
launches the |
RichTextFX 1.0.0 is fine by me. |
I don't think the issue here is which java version is required, the two main issues (in my mind) are:
I think moving to v1 is fine now. |
FWIW, BellSoft's Liberica full JDK version bundles JavaFX. The installer script for KeenWrite (my Markdown editor) downloads the "full" JRE version specifically for this reason. See: |
For a 0.* release the semantic versioning rules allow anything to break. |
I think this means updating both reactfx and wellbehavedfx which aren't modularized. I think flowless and undo are OK, or at least I didn't see any warning about filename-based automodules when building a project with maven. |
@Jugen Thanks for you great work by keeping the project alive. Still if you don't mind me asking, do you have any plans to continue working on this issue? |
Yes, I intend to publish a release in the next few weeks .... |
RichTextFX |
Currently RichTextFX has a minimum requirement of Java 8.
I'd greatly appreciate having community feedback with regards to moving to Java 11.
If nobody objects then version 0.10.7 will be the last Java 8 compatible release.
Also what should the new release version based on Java 11 be:
The text was updated successfully, but these errors were encountered: