This question already has an answer here:
Setting up JDK 10 in IntelliJ IDEA: the selected directory is not a valid home for JDK
(1 answer)
Closed 4 years ago.
Please refer to the picture below.
I changed the default java installation path to D:\Program Files\Java\
I created a new java project.
Firstly, it reminds me the java path is not existed and the program cannot run.
When I tried to modify the path to my location, it rejected me saying it's an invalid path.
Why?
Please note: this post didn't resolve my question:
I know the difference of jdk and jre; I do reinstalled latest java repeatedly.
Only, I didn't want to install java to C disk. I have set my JDK_HOME and JRE_HOME to my location.
You're right! IntelliJ version 2018 resolve this issue.
2017.1 is not compatible with java 10. For official java 10 support please use 2018.1. Also It is possible to use jdk10 with 2017.3 build,
but there would be no syntax highlighting.
Source, emphasis mine
Java 10 support starts from build 2018.1.
take a look at this IDEA 2017.1.1 doesn't detect JDK 10
You have to upgrade your IDE now.
You are getting that error because your IDE is out of date. Updating your IDE here should do the trick.
Related
I had some problems with JRE versions, so I tried to change it using the plugin Choose Runtime. I changed it to Java 1.8.0_112-release-287-b2. Now, when trying to start IntelliJ, i get an unsupported Java version error: Cannot start under Java 1.8.0_112-release-287-b2: Java 11 or later is required. I have tried to modify the runtime path in the ide64.exe.jdk file, but it seems like the old jdk IntelliJ ran on has been deleted. I also tried reinstalling intellij, no luck either. Anyone know how to get back the JDK? do I just download it from oracle and install it in the IdeaIC2020.3\jdks\ folder?
Thanks,
Jakob
I went to the jdks folder and deleted all contents. This fixed the issue. IntelliJ started without a problem.
Has anyone had any success using JDK 16 (https://jdk.java.net/16/) early access build with IntelliJ?
I am able to use JDK 15 early access builds, but when I try JDK 16 I get an error message:
Error: Cannot determine path to 'tools.jar' library for 16 (path/to/jdk-16)
All of the research I've done says JDK stores tools.jar inside of the path/to/jdk-16/lib folder. Thing is, tools.jar isn't there in the JDK 15 package either, yet JDK 15 works fine.
If anyone has any clue on how to fix this issue I'd appreciate it. I'm still trying, and if I figure it out I'll update this post.
Thanks in advance.
There was an issue: IDEA-243962. It is fixed now in 2020.2 version. EAP version is already available here.
How to Solve IntelliJ IDEA Error: Cannot determine path to ‘tools.jar‘ library for 17 (C:\Program Files\Java\jd…
open file
improve the version of IntelliJ idea.
update ide then try rerun
source for details:
enter link description here
I downgraded my Java from 15 to 11. Now it is working fine.
(IntelliJ Idea 2020.1)
This question already has answers here:
IntelliJ can't recognize JavaFX 11 with OpenJDK 11
(7 answers)
Closed 3 years ago.
I think I am not alone who doesn't know how to properly download Java and JavaFX on Linux. And how make it works in IntelliJ Idea
So my questions are:
I'm looking for Java JRE or Java SDK?
Must Java and JavaFX be at same version?
How I will connect it with IntelliJ
Do I have to write something like in windows "path variable"?
Maybe this is not proper question, because it was answered somewhere else, but I dont undrestand basic things about installation of Java. Thanks everyone.
1) JRE is a Java Runtime Environment - enough for Java code to run but not enough to develop code. What you need is JDK (Java Development Kit), you can download it here https://www.oracle.com/technetwork/java/javase/downloads/index.html
2) No, they don't need to be the same version
3) Follow these steps: https://openjfx.io/openjfx-docs/#maven
I prefer doing it with Maven (less hassle) but you can find easy to follow explanations for both on that page
4)Yes in linux you need to add Path variable as well - here are the instructions:
https://www.baeldung.com/linux/path-variable
I have searched but not found any detailed information about it. In http://www.oracle.com/technetwork/java/javafx/downloads/index.html it says
As of JDK 7u6 JavaFX is included with the standard JDK and JRE bundles
But I am getting error on compile the code includes javafx.* packages. The packages are not founding. I am using Oracle JDK 10.0.2 and Intellij Idea 2018.2. Code is worked after I added the $JAVA8_HOME/jre/lib/ext/jfxrt.jar as library.
But the strange thing is I am able to build the code to target bytecode version 8 without adding the jar file from JDK 8 as above.
So the question is
How can I get the latest JavaFX?
Is the latest JavaFX is in the JDK 8?
UPDATE
JDK 10 includes JavaFX and compiled and ran successfully in command line. There is a problem with Intellij IDEA 2018.2. It does not recognize the JavaFX packages.
The error message in Intellij:
Error:(3, 26) java: package javafx.application does not exist
Note: There is no error while coding in editor (Not underling red). Error occurs when compiling in Intellij.
Updated question title.
JavaFX is included in Oracle JDK up to and including Java 10. From Java 11 onwards it will not be included anymore but can be downloaded separately here http://jdk.java.net/openjfx/ .
Additional information on how to get started with JavaFX from version 11 onwards is also available here: http://docs.gluonhq.com/javafx11/ .
Problem solved with this step:
Set the Project byte code version to 10 instead of 8 in
File > Settings > Build, Execution, Deployment > Compiler > Java Compiler
Thanks for helps.
This question already has answers here:
How to use JavaFX 2 SDK in Eclipse?
(8 answers)
Closed 9 years ago.
How to use JavaFX classes inside Eclipse Plugin?
Apparently I am unable to add jfxrt.jar somehow, because it depends on java version and I don't know under which java my plugin will run.
UPDATE
In the "duplicate" question How to use JavaFX 2 SDK in Eclipse? it is answered either to set classpath to jafrt.jar or to use e(fx)clipse
First option looks not portable, because path to java may vary.
And I had failed with second. I have installed e(fx)eclipse into my application but can't figure which plug-ins to include into runtime config.
The only option you have today with Java7 or Java8 is to make use of Equinox Adapter Hooks. e(fx)clipse provides those for free and they are already used by other Eclipse tools like the Spring IDE.
You can find a tutorial on how to integrate JavaFX into your Eclipse Plugins at https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial2
Please note that the tutorial is pointing to the nightly builds who only work with Luna & Java8 if you want to target Kepler / Java7 you need to use the released version of e(fx)clipse which is at http://download.eclipse.org/efxclipse/runtime-released/0.9.0/site
The easiest way would be to download the latest version of Java7 and use that to start eclipse (Java7 now has JavaFX packaged with it).
Otherwise I believe you would need to specify it either in your shortcut to eclipse (I'm assuming a Windows OS):
"C:\Program Files\...\eclipse.exe" -vm "C:\Program Files\...\javaw" -Xbootclasspath "C:\Program Files\...\jre\lib\jfxrt.jar"
Or you could create a _JAVA_OPTIONS environment variable containing the same information about the classpath:
-Xbootclasspath "C:\Program Files\...\jre\lib\jfxrt.jar"
The JVM should pick that up.
Please note, this is highly OS specific and the file paths need to be adjusted for your system.
edit
The JVM argument has been updated per the suggestion by #tomsontom