0

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.

enter image description here

Wason
  • 1,341
  • 1
  • 13
  • 26

3 Answers3

2

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

Michael
  • 41,989
  • 11
  • 82
  • 128
1

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.

Youcef LAIDANI
  • 55,661
  • 15
  • 90
  • 140
1

You are getting that error because your IDE is out of date. Updating your IDE here should do the trick.

Zeeno
  • 2,671
  • 9
  • 37
  • 60