I am using windows and configured environment variables for Java 11. On the terminal, java version is 11 as expected and I am to compile and run Java class files via the terminal.
On Intellij (Community Version 2018.3.5), used to have version 8 which worked fine. I am not able to get it to work since changing to version 11 (tested with brand new projects too).
Under project Structure, file path is set to C:\Program Files\Java\jdk-11 as expected.
Under Project settings/ module, version set to 1.11 JDK. Unable to change language level to 11. Max level possible is 9.
For Default Project settings, unable to select any options for target bytecode version.
When I try to run the main method, which has nothing but a print statement, I get following error message:
Error:Cannot run program "D:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.3\jre64\bin\java" (in directory "C:\Users\username.IdeaIC2017.3\system\compile-server"): CreateProcess error=2, The system cannot find the file specified
Why is it looking at some weird space when my jdk path has been specified at C:\Program Files\Java\jdk-11 already?
Please advice what I am missing. Added some screen shots for reference.
UPDATE: My version is Community Version 2017.3.5. Refer to my comment below.
2018.3.4
works fine for jdk > 1.8
The problem you are having is because of the settings that are being used
Error:Cannot run program "D:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.3\jre64\bin\java" (in directory "C:\Users\username.IdeaIC2017.3\system\compile-server"): CreateProcess error=2, The system cannot find the file specified
Reinstalling and not reusing the same settings from 2017 should work fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With