Skip to content

Commit 777cc2c

Browse files
shin19991207datho7561
authored andcommitted
Upgrade embedded JRE to Java 25
Signed-off-by: Morgan Chang <shin19991207@gmail.com>
1 parent a0b2508 commit 777cc2c

8 files changed

Lines changed: 11 additions & 12 deletions

File tree

‎.github/workflows/pr-verify.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set Up Java
1919
uses: actions/setup-java@v4
2020
with:
21-
java-version: '21'
21+
java-version: '25'
2222
distribution: 'temurin'
2323
- run: npm install -g typescript "@vscode/vsce"
2424
- run: wget http://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz

‎.github/workflows/release.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
- name: Set Up Java
8282
uses: actions/setup-java@v5
8383
with:
84-
java-version: '21'
84+
java-version: '25'
8585
distribution: 'temurin'
8686
- name: Build JDT-LS
8787
if: "${{ inputs.JDT_LS_VERSION == '' }}"
@@ -140,7 +140,7 @@ jobs:
140140
# Package for each platform (only downloads JDK and creates VSIX, no recompilation)
141141
platforms=("win32-x64" "win32-arm64" "linux-x64" "linux-arm64" "darwin-x64" "darwin-arm64")
142142
for platform in ${platforms[@]}; do
143-
npm run download-jre -- --target ${platform} --javaVersion 21
143+
npm run download-jre -- --target ${platform} --javaVersion 25
144144
SKIP_WEBPACK=true vsce package ${{ env.publishPreReleaseFlag }} --target ${platform} -o java-${platform}-${{ env.EXT_VERSION }}-${GITHUB_RUN_NUMBER}.vsix
145145
done
146146

‎.sdkmanrc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Enable auto-env through the sdkman_auto_env config
22
# Add key=value pairs of SDKs to use below
3-
java=21.0.5-tem
3+
java=25.0.2-tem

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Quick Start
1515
============
1616
1. Install the Extension
1717
2. On the following platforms, the extension should activate without any setup : `win32-x64`, `win32-arm64`, `darwin-x64`, `darwin-arm64`, `linux-x64`, `linux-arm64`.\
18-
If on another platform, or using the "universal" version, you can [set](#setting-the-jdk) a _Java_ Development Kit. It must be Java 21 or above.
18+
If on another platform, or using the "universal" version, you can [set](#setting-the-jdk) a _Java_ Development Kit. It must be Java 25 or above.
1919
3. Optionally, download and install a Java Development Kit for your project (Java 1.8 or above is supported). See [Project JDKs](#project-jdks) for more details
2020
4. Extension is activated when you first access a Java file
2121
* Recognizes projects with *Maven* or *Gradle* build files in the directory hierarchy.
@@ -61,7 +61,7 @@ Now that Java extension will publish platform specific versions, it will embed a
6161

6262
The following part is only kept for the universal version without embedded JRE.
6363

64-
>The tooling JDK will be used to launch the Language Server for Java. And by default, will also be used to compile your projects. Java 21 is the minimum required version.\
64+
>The tooling JDK will be used to launch the Language Server for Java. And by default, will also be used to compile your projects. Java 25 is the minimum required version.\
6565
\
6666
The path to the Java Development Kit can be specified by the `java.jdt.ls.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.
6767
>- the `JDK_HOME` environment variable

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@
316316
"null"
317317
],
318318
"default": null,
319-
"description": "Specifies the folder path to the JDK (21 or more recent) used to launch the Java Language Server.\nOn Windows, backslashes must be escaped, i.e.\n\"java.home\":\"C:\\\\Program Files\\\\Java\\\\jdk-21.0_5\"",
319+
"description": "Specifies the folder path to the JDK (25 or more recent) used to launch the Java Language Server.\nOn Windows, backslashes must be escaped, i.e.\n\"java.home\":\"C:\\\\Program Files\\\\Java\\\\jdk-25.0.2\"",
320320
"scope": "machine-overridable",
321321
"deprecationMessage": "This setting is deprecated, please use 'java.jdt.ls.java.home' instead.",
322322
"order": 0
@@ -327,7 +327,7 @@
327327
"null"
328328
],
329329
"default": null,
330-
"description": "Specifies the folder path to the JDK (21 or more recent) used to launch the Java Language Server. This setting will replace the Java extension's embedded JRE to start the Java Language Server. \n\nOn Windows, backslashes must be escaped, i.e.\n\"java.jdt.ls.java.home\":\"C:\\\\Program Files\\\\Java\\\\jdk-21.0_5\"",
330+
"description": "Specifies the folder path to the JDK (25 or more recent) used to launch the Java Language Server. This setting will replace the Java extension's embedded JRE to start the Java Language Server. \n\nOn Windows, backslashes must be escaped, i.e.\n\"java.jdt.ls.java.home\":\"C:\\\\Program Files\\\\Java\\\\jdk-25.0.2\"",
331331
"scope": "machine-overridable",
332332
"order": 10
333333
},

‎scripts/index.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Commands:
113113
repo-fix Fix package-lock.json registry references
114114
115115
Examples:
116-
node scripts/index.js download-jre --target darwin-x64 --javaVersion 21
116+
node scripts/index.js download-jre --target darwin-x64 --javaVersion 25
117117
node scripts/index.js build-or-download
118118
node scripts/index.js watch-server
119119
`);

‎scripts/jre.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { downloadFile, getScriptDir, extractTarGz, handleError, setupMainExecuti
77

88
const dirname = getScriptDir();
99

10-
const LATEST_JRE = 21;
10+
const LATEST_JRE = 25;
1111

1212
const platformMapping = {
1313
"linux-arm64": "linux-aarch64",

‎src/requirements.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { Commands } from './commands';
99
import { logger } from './log';
1010
import { checkJavaPreferences } from './settings';
1111
import { listJdks, sortJdksBySource, sortJdksByVersion } from './jdkUtils';
12-
import { getJavaConfiguration } from './utils';
1312

1413
/* eslint-disable @typescript-eslint/naming-convention */
1514
export interface RequirementsData {
@@ -41,7 +40,7 @@ export async function resolveRequirements(context: ExtensionContext): Promise<Re
4140
const preferenceName = javaPreferences.preference;
4241
let javaHome = javaPreferences.javaHome;
4342
let javaVersion: number = 0;
44-
const REQUIRED_JDK_VERSION = ('on' === getJavaConfiguration().get('jdt.ls.javac.enabled'))?25:21;
43+
const REQUIRED_JDK_VERSION = 25;
4544
if (toolingJreVersion < REQUIRED_JDK_VERSION) { // embedded tooling JRE doesn't meet requirement
4645
toolingJre = null;
4746
toolingJreVersion = 0;

0 commit comments

Comments
 (0)