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
Related
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.
*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".
So, I migrated from Java 6 to Java 8 and from Eclipse Kapler to Neon. Before I used eclipse-SDK-3.7.1-linux-gtk-x86_64 for the SDK in my build.xml.
Now I'm trying to figure out which SDK I need to use and where should I download it. Should it be eclipse-SDK-4.6-linux-gtk-x86_64? How do I know which version of SDK is the needed for Eclipse Neon and JDK 8?
Neon was indeed version 4.6, but it was released in June of 2016, meaning it's old enough to have been archived. The current release, 2020-03, is capable of writing for Java 8 just fine.
Does VS Code (code-runner extension) support JDK 1.8? In the morning I was using JDK 12 , but then I downgraded to JDK 1.8 to try out applet viewer and stuff. Unfortunately now it doesn't even highlight the code.
Someone please tell me the problem and its solution.
JDK 1.8 is supported by VSCode.
Read https://code.visualstudio.com/docs/languages/java and install needed extensions.
Update 2021
Currently to use the Java extension in VSCode its required JDK 11, but you can still use older versions of JDK in your projects. See this to get information about how to configure other JDK version for your project.
Java 1.8 was no longer supported since "Language support for Java" extension upgrade to 0.68.0, I downgraded to 0.64.1 which works for me.
As stated here:
Note: Although the Java language server requires JDK version 11 or above to run, this is NOT a requirement to your project's runtime.
This means that you need to have JDK 11 or higher installed. You can also install older JDKs and configure the runtimes. Just open the Command Palette (Ctrl+Shift+P) and type the command Java: Configure Java Runtime. If you have JDK 8 installed and have properly configured maven or gradle, this isn't even necessary. Visual Studio Code will correctly pick up the correct JDK.
VS Code no longer supports JDK 1.8. The "Java Extension Pack" relies upon "Language Support for Java(TM) by Red Hat" which documents Java 11 is the minimum requirement. See here: https://marketplace.visualstudio.com/items?itemName=redhat.java
Tis unfortunate, guess I'm switching back to eclipse
I've an old machine running Windows XP 32.
Because Oracle dropped support for WXP 32 bits, I've manually installed the jdk following
the awesome answer here:
installing JDK8 on Windows XP - advapi32.dll error
I've however not added it yet to the JAVA_PATH, which is set to jdk 6. I don't know if it would harm or not to add it as well, but I want to be conservative here because a lot of programs in this machine need jdk 6. I don't want to break anything working now.
I'd like to toy around in eclipse to test the new Java 8 features. I've manually added the new jre 8 in the "Installed JREs" section under window -> preferences. In the compiler combo, the highest level available is 1.7 (installed jdk7 some time ago, this time using the official installer, but I still keep java 6 as the default in the system). I don't see any option to add the new level.
Consequently, when creating a new project using the new JRE, a warning is shown saying:
The current workspace uses a 1.4 JRE with compiler compliance level
1.6. This is not recommended and either the JRE or the compiler compliance level should be changed.
Seems a problem derived from the manual installation of the JDK.
I'm using Eclipse Kepler v4.3.1, but I have also tested this in older 3.x install with identical results.
Any help will be appreciated.
Support for Java 8 in Eclipse Kepler 4.3.2 is described here. This basically says specify
http://download.eclipse.org/eclipse/updates/4.3-P-builds/
as the 'Work with' site on Install New Software and select 'Eclipse Java 8 Support'.
Recent builds of Eclipse 4.4 Luna (since 18 March 2014) have Java 8 support included (but Luna is still under development).
Update:
Eclipse Luna (4.4) was released on 25 June 2014