Skip to content

Commit

Permalink
Extension requires Java 21
Browse files Browse the repository at this point in the history
Fixes #388

Signed-off-by: David Thompson <[email protected]>
  • Loading branch information
datho7561 committed Feb 24, 2025
1 parent 638c0de commit 83e2575
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ In `Java` files, you will benefit with:
## Requirements

* [Language Support for Java(TM) by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java)
* Java JDK (or JRE) 11 or more recent is required **except** on the following platforms : `win32-x64`, `linux-x64`, `linux-arm64`, `darwin-x64`, `darwin-arm64`. See [JDK Tooling](https://github.com/redhat-developer/vscode-java/#java-tooling-jdk) for details.
* Java JDK (or JRE) 21 or more recent is required **except** on the following platforms : `win32-x64`, `linux-x64`, `linux-arm64`, `darwin-x64`, `darwin-arm64`. See [JDK Tooling](https://github.com/redhat-developer/vscode-java/#java-tooling-jdk) for details.

## Supported VS Code settings

Expand Down
4 changes: 2 additions & 2 deletions src/languageServer/requirements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ function checkJavaVersion(javaHome: string): Promise<number> {
return new Promise((resolve, reject) => {
cp.execFile(javaHome + '/bin/java', ['-version'], {}, (error, stdout, stderr) => {
const javaVersion = parseMajorVersion(stderr);
if (javaVersion < 11) {
reject(openJDKDownload(`Java 11 or more recent is required to run 'Tools for MicroProfile'. Please download and install a recent JDK.`));
if (javaVersion < 21) {
reject(openJDKDownload(`Java 21 or more recent is required to run 'Tools for MicroProfile'. Please download and install a recent JDK.`));
} else {
resolve(javaVersion);
}
Expand Down

0 comments on commit 83e2575

Please sign in to comment.