You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Windows, if JDK installer is downloaded here from Oracle, the java executable is special, JAVA_HOME is not set either. I don't understand why Oracle did such a tricky thing.
Setting java.home to "C:\Program Files\Java\jdk1.8.0_201" do help me out. But the user experience is terribly bad, especially for new Java developers. Can we find a way to optimize for Windows+OracleJDK users? (i.e. recognize Java home automatically for them)
C:\Users\username>where java
C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe
C:\Users\username>java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
Environment
Operating System: Windows 10
JDK version: Oracle JDK 8u201
Visual Studio Code version: 1.32.1
Java extension version: 0.40.0
The text was updated successfully, but these errors were encountered:
Yes, you are right. Just tried printing the java.home and it's "C:\Program Files\Java\jre1.8.0_201". I never knew that before.
Yet I have to say the experience is not friendly enough to new comers. When I saw the message "Java runtime could not be located", I was thinking "fool me? I do have a java runtime and I can execute java program in CLI". I'm wondering whether there is any possibility to infer the JDK home? Or maybe at least the error message should be more concrete, e.g. something like "JDK is required but can be located." Just my two cents.
I was always wondering why the library find-java-home could not recognize a newly installed Oracle JDK, until I step into the code. With some simple testing, I find several issues: jsdevel/node-find-java-home#19
For Windows, if JDK installer is downloaded here from Oracle, the java executable is special, JAVA_HOME is not set either. I don't understand why Oracle did such a tricky thing.
Setting
java.home
to "C:\Program Files\Java\jdk1.8.0_201" do help me out. But the user experience is terribly bad, especially for new Java developers. Can we find a way to optimize for Windows+OracleJDK users? (i.e. recognize Java home automatically for them)Environment
The text was updated successfully, but these errors were encountered: