redhat-developer / redhat-developer/vscode-java
OpenJDK 16 in java.home not recognized
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 547
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
I installed openjdk 16.0.1 via homebrew, and set corresponding path in java.home, but under "Java Tooling Runtime" tab of "Configure Java Runtime" page, nothing is not listed. FYI, I also have another two jdk 8 installed, and both 3 are written to java.configuration.runtimes, but "Installed JDKs" tab only shows those two jdk 8 installation.
Environment
- Operating System: macOS Big Sur 11.2.3 (on Apple Silicon)
- JDK version: installed path says 16.0.1, but
java -versionsays 17,brew info openjdksays it's 17 preview - Visual Studio Code version: 1.56.2 (Universal)
- Java extension version:
Some lines from settings.json:
"java.home": "/opt/homebrew/Cellar/openjdk/16.0.1",
"java.configuration.runtimes": [
{
"name": "JavaSE-16",
"path": "/opt/homebrew/Cellar/openjdk/16.0.1",
},
{
"name": "JavaSE-1.8",
"path": "/Users/luzepu/Library/Java/JavaVirtualMachines/azul-1.8.0_292/Contents/Home",
"default": true
},
{
"name": "JavaSE-1.8",
"path": "/Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home"
}
],
java -version outputs:
➜ ~ /opt/homebrew/Cellar/openjdk/16.0.1/bin/java -version
openjdk version "17" 2021-09-14
OpenJDK Runtime Environment Homebrew (build 17+0)
OpenJDK 64-Bit Server VM Homebrew (build 17+0, mixed mode)
➜ ~ /Users/luzepu/Library/Java/JavaVirtualMachines/azul-1.8.0_292/Contents/Home/bin/java -version
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (Zulu 8.54.0.21-CA-macos-aarch64) (build 1.8.0_292-b10)
OpenJDK 64-Bit Server VM (Zulu 8.54.0.21-CA-macos-aarch64) (build 25.292-b10, mixed mode)
➜ ~ /Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home/bin/java -version
java version "1.8.0_291"
Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.291-b10, mixed mode)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the settings.json runtime entries and the Configure Java Runtime page, then compare the configured Homebrew path with the reported output from java -version and brew info openjdk. Reproduce the Installed JDKs listing and determine whether the path is omitted because it contains a different JDK version than its configuration name; done means the intended runtime is listed correctly or the mismatch is clearly reported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100