Skip to content

Commit f4eea29

Browse files
authored
search all installed JDKs when java.home not specified (#1701)
Signed-off-by: Yan Zhang <[email protected]>
1 parent 3ae6147 commit f4eea29

File tree

5 files changed

+444
-70
lines changed

5 files changed

+444
-70
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,16 @@ See the [changelog](CHANGELOG.md) for the latest release. You might also find us
5151

5252
Setting the JDK
5353
===============
54-
The path to the Java Development Kit is searched in the following order:
54+
## Java Tooling JDK
55+
This JDK will be used to launch the Java Language Server. And by default, will also be used to compile your projects.
56+
57+
The path to the Java Development Kit can be specified by the `java.home` setting in VS Code settings (workspace/user settings). If not specified, it is searched in the following order until a JDK meets current minimum requirement.
5558

56-
- the `java.home` setting in VS Code settings (workspace then user settings)
5759
- the `JDK_HOME` environment variable
5860
- the `JAVA_HOME` environment variable
5961
- on the current system path
6062

61-
This JDK will be used to launch the Java Language Server. And by default, will be used to compile your projects.
62-
63+
## Project JDKs
6364
If you need to compile your projects against a different JDK version, it's recommended you configure the `java.configuration.runtimes` property in your user settings, eg:
6465

6566
```json

package-lock.json

Lines changed: 49 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,7 @@
880880
"@types/mocha": "^5.2.5",
881881
"@types/node": "^8.10.51",
882882
"@types/vscode": "^1.47.0",
883+
"@types/winreg": "^1.2.30",
883884
"@types/winston": "^2.4.4",
884885
"gulp": "^4.0.2",
885886
"gulp-decompress": "^3.0.0",
@@ -903,6 +904,7 @@
903904
"fs-extra": "^8.1.0",
904905
"glob": "^7.1.3",
905906
"vscode-languageclient": "6.0.0-next.9",
907+
"winreg-utf8": "^0.1.1",
906908
"winston": "^3.2.1",
907909
"winston-daily-rotate-file": "^3.10.0"
908910
}

0 commit comments

Comments
 (0)