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
Build with Java 8 #44
Comments
The problem lies in the implementation of the There are 3 options at hand:
Option 1 is the path of least resistance from the builders POV, however consumers become affected because either the use an older version compatible with Java 8 (thus lacking new features and packs) or forcibly upgrade to Java 11+. Option 2 can be tricky as the following changes are required:
Option 3 is similar to 2 but the codebase split may be managed with a MRJAR layout. Granted, when we tried building MRJARs in the past we didn't have any support from Gradle to make it easy, nowadays we have access to https://github.com/java9-modularity/gradle-modules-plugin which might makes things easier. |
Thanks much for the very detailed feedback! The API requirement is just for the JavaFX artifact? I was initially looking at the Swing offering. But if you already made a conscious decision about upgrading to a newer Java version, than that's what it is. It's probably not too difficult to produce a compatible version if I shouldn't be able to lift the Java version. |
Yes, this is indeed a restriction imposed by the JavaFX artifact. Swing could be used with any version above if it were compiles with Java 8. Perhaps that's the key, compile all modules (except |
There are some discussions on ControlsFX: controlsfx/controlsfx#1195 @aalmiray Is there any chance to reconsider and to release two binary jars? One for JDK8 and the other for JDK11? We, unfortunately, live in an imperfect world between JDK8/11 ... Would be much appreciated! grin |
I have an issue compiling my JavaFxProject to an executable Jar. the jar is created but when I run the jar file in intellij i get the following error: `Mar 18, 2021 3:04:57 PM com.sun.javafx.application.PlatformImpl startup
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException |
I am using Java 16 with OpenJFX 16. in intellij I created a normal JavaFX project and it worked fine and with another project with the ikonli icons I got the error i posted early.CAN I GET SOME HELP PLEASE!!!!!!!!!!! |
|
The project i created wasn't created using maven. Can i still use maven i
am using intellij
…On Thu, Mar 18, 2021, 3:20 PM Andres Almiray ***@***.***> wrote:
1. This looks like a different issue than the original one, that is,
running an application with Java 8 and Ikonli.
2. Latest Ikonli (12.x) only works with JavaFX 11 an upwards.
3. Running JavaFX with Ikonli in a single JAR in the classpath require
merging all service files found in /META-INF/services. Use the Maven
shade plugin or the Gradle shadow plugin to create a shaded JAR.
4. Running a single JAR in the modulepath requires more work, as you'd
need to shade al dependencoies and craft an aggregating
module-info.java that exposes all required services.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#44 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARTJHQYPWOPGW7WBQUOK2L3TEJOA7ANCNFSM4GUA6DGQ>
.
|
The same rules apply. Running the application from the IDE (using a run configuration) should put all required dependencies in the runtime classpath, the service files should be found. Running the JAR from the IDE requires all dependencies to be available. Either you add a |
Ok am going to try something. Hope it works
…On Thu, Mar 18, 2021, 3:32 PM Andres Almiray ***@***.***> wrote:
The same rules apply. Running the application from the IDE (using a run
configuration) should put all required dependencies in the runtime
classpath, the service files should be found. Running the JAR from the IDE
requires all dependencies to be available. Either you add a Class-Path:
manifest entry to the application' JAR manifest *AND* include all
dependencies as value *AND* ensure all dependency JARs are physically
located where the manifest will find them, *OR* shade the application
JAR. It might be possible to use the IDE to create a shaded JAR, I have no
idea as I prefer to use command line tools to build projects. Pick either
Maven or Gradle.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#44 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARTJHQ7XQHZP4YRD34623LLTEJPMNANCNFSM4GUA6DGQ>
.
|
It would be nice if the latest Ikonli release would support older Java versions as well. Java 8 is still very commonly used. Or is there a technical reason Java 11 is required?
With newer Java versions one can use the "--release" compiler option to produce compatible classes.
The text was updated successfully, but these errors were encountered: