I've spent too much time trying to find how to do this with. Tips for setting up a dev environment are what I am asking for, however I will start with what I tried so far.
As I understand JavaFX was separated from the JDK after JDK 8, however, for an R&D project, I need to create JavaFX applications that can be built and compiled in Java 11. Normally installing the e(fx)clipse plugins into Eclipse will not work unless a Java 8 installation is pointed to.
So, I have been following this guide: https://gist.github.com/stevenliebregt/bc62a382fc43064136b662ee62172ab3
JavaFX 11 is on LTS from Gluon, it seems, meaning I'd have to pay at least $900 to get it.
So instead, I tried building OpenJFX using following the instructions at this link:
https://wiki.openjdk.org/display/OpenJFX/Building+OpenJFX
When I start the build with Gradle, it fails because the minimum supported version for Java to build this is apparently 17.
Any suggestions for building JavaFX projects with JDK 11 is greatly appreciated.
The LTS version is JavaFX 11.0.16. You can download non-LTS 11.x versions from GluonHQ by checking the "include older versions" checkbox on the download page.
Once you clicked it, you see all versions starting with 11 until 20-ea+1, even the obsolete ones.
Your best choice is probably 11.0.2
And to add something you didn't ask for: JDK 11 is compatible with the latest versions of JavaFX, even JavaFX 18, as you can see in the Release Notes:
"As of JDK 11 the JavaFX modules are delivered separately from the
JDK. These release notes cover the standalone JavaFX 18 release.
JavaFX 18 requires JDK 11 or later."
(I emphasized the last part of the quote)
Thanks all, for the good information. I found that the best way to handle this way to build in IntelliJ instead. I can build and run JavaFX 18 easily with JDK 11.
Related
I tried installing Jenkins with JDK 11 on a Linux server, and now I'm trying to add the Selenium (Grid) plugin.
I managed to get it to work on Jenkins with JDK8, but after upgrading to JDK 11, the plugin says Accept Time out, and the setting to access the grid on the right in Jenkin's menu disappeared.
I can't find a documentation saying it isn't compatible with JDK11, as on their page it says it requires java 1.8 or later.
*Note: I also tried a fresh installation with JDK 11 directly, but I got the same result.
I'm a little late, but for those who read it later. Selenium plugin is not compatible with java 11. You have to use java 8.
*Due to some project requirements I "have" to use eclipse 4.18 (2020-12) which uses Java 11 by default and is mandatory to start.
But my entire project is/was written in Java 1.7 earlier. Now , in my mac i have both java 1.8 and 11 installed also my eclipse settings are such shown below.
I have made sure removed all java 11 references in my eclipse and made the project and workspace configure to take the 1.8 jdk and run at 1.7 compiler level.*
but when i run ,project -->clean-->build, i run into the JaxB missing in java 11 ( in java 11 JAXB was removed and my project uses jaxB extensively) This is known.
So i am wondering what am i missing that my projects are still building my project with java 11 and not java 1.7 (using jdk 1.8 configured).
Please help.. stuck on this since some days.
machome
Eclipse Compiler setting-1
Eclipse Setting Execution Envs
Eclipse installed JRE's
Eclipse Project specific setting
Java 11 JaxB error
If Eclipse itself is being run with Java 11, and you have a plug-in installed that has not been properly update to work under Java 11, as it appears, you will need an updated version of that plug-in. Update to the latest "oracle design studio", and if you still see this problem, contact Oracle support.
The latest Eclipse may require Java 11 to run, but it's simple to set up Eclipse projects that use older Java versions. Don't mess with the Java version it uses to start up, as long as that is a proper Java 11 version.
As one commenter mentions, you'll have to have a particular Java distribution configured in "Installed JREs->Execution Environments", and then you'll have to have the project configured to use that Java version symbol, like "JavaSE-1.7".
I cannot add jdk11 and jdk13 in intelliJ as SDK. I am able to add jdk-18.0_22 only.
Why is that so?
Based on the comment from #MarsAtomic, I would guess that your version of Intellij (14.1.4) is too old to use the new versions of java.
14.1.* was last released on May 11, 2016.
JDK 11 reached General Availability on 25 September 2018.
The implication of Java 11 in IntelliJ IDEA 2018.2 is that you need to use Intellij IDEA 2018.2 or later to work with Java 11.
I expect that one reason that your older Intellij install is not recognizing your Java 11 or Java 13 install is that the JDK classes are packaged differently starting with Java 9.
For support of Java 13 preview features you will need IntelliJ IDEA 2019.2
I've recently upgraded from JDK 10 to JDK 11 and installed the latest Eclipse IDE for Java developers, at verison 2018-12 (4.10.0).
However for some reason my old Java FX projects (that worked with JDK 10) are not working. It says that the classes cannot be resolved. The image below shows the red lines where the affected classes lie.
I've tried a number of things such as making sure the build path of the project is correct:
I've also made sure the eclipse javafx plugin is installed:
I've also made sure my JDK 11 install has had the correct envrioment variables set, but none of the above has had any affect.
I've also looked at similar questions related to this but none of there soloutions worked.
Any help would be appreiated.
I tried everything I installed every possible Java file a million times I installed the newest gradle version but it continues to show this error. I'm on Mac. Please help thanks
IF you do not want to develop for Android Java 11 works fine libgdx.
You have to change some things before everything builds and runs.
Here's what I did to get my project working.
My context Mac OSX 10.14 and openJDK 11.0.2, new project, Desktop launcher and a bunch of Extensions (not important).
The error you get about not being able to find java 11.0.x comes from gradle. Java 11 is only supported since gradle 5. In order to use gradle 5 instead of 4.6 the generated project is configured with, go to <project-dir>/gradle/wrapper/gradle-wrapper.properties and change distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip into distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-all.zip.
That resolves the java 11 error just to confront you with a new error Could not get unknown property 'classesDir' for main classes of type org.gradle.api.internal.tasks.DefaultSourceSetOutput.
To get rid of that, open <project-dir>/desktop/build.gradle and change line 27 (might be different for you)
from files(sourceSets.main.output.classesDir) into
from files(sourceSets.main.output.classesDirs)
thats classesDir into classesDirs
This should resolve all build errors and you're good to go.
I am strongly recommend to use Java version not greater than 8. It is many incompatibility issues I faced just on 9 version of JDK in Android Dev environment.
Uninstall all java you have, use this article, because it is not as such easy without knowledge: https://www.java.com/en/download/help/mac_uninstall_java.xml
After download the 8th version from here: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
I did same some time ago and all problems left