Skip to content

Commit

Permalink
A Java 21 Execution Environment is required at a minimum.
Browse files Browse the repository at this point in the history
- Eclipse Platform 4.35 now requires Java 21
- Remove unnecessary Jenkinsfile (builds occur on Github Actions)

Signed-off-by: Roland Grunberg <[email protected]>
  • Loading branch information
rgrunber committed Jan 9, 2025
1 parent 266537c commit fdfccb2
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 176 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set Up Java
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'adopt'
- run: npm install -g typescript "vsce"
- run: wget http://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
run: |
platforms=("win32-x64" "linux-x64" "linux-arm64" "darwin-x64" "darwin-arm64")
for platform in ${platforms[@]}; do
npx gulp download_jre --target ${platform} --javaVersion 17
npx gulp download_jre --target ${platform} --javaVersion 21
vsce package ${{ env.publishPreReleaseFlag }} --target ${platform} -o java-${platform}-${{ env.EXT_VERSION }}-${GITHUB_RUN_NUMBER}.vsix
done
rm -rf jre/
Expand Down
2 changes: 1 addition & 1 deletion .sdkmanrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=17.0.3-tem
java=21.0.5-tem
160 changes: 0 additions & 160 deletions Jenkinsfile

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Quick Start
============
1. Install the Extension
2. On the following platforms, the extension should activate without any setup : `win32-x64`, `darwin-x64`, `darwin-arm64`, `linux-x64`, `linux-arm64`.\
If on another platform, or using the "universal" version, you can [set](#setting-the-jdk) a _Java_ Development Kit. It must be Java 17 or above.
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.
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
4. Extension is activated when you first access a Java file
* Recognizes projects with *Maven* or *Gradle* build files in the directory hierarchy.
Expand Down Expand Up @@ -60,7 +60,7 @@ Now that Java extension will publish platform specific versions, it will embed a

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

>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 17 is the minimum required version.\
>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.\
\
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.
>- the `JDK_HOME` environment variable
Expand Down
14 changes: 7 additions & 7 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ gulp.task('clean_jre', function (done) {
});

// Pls update the latest JRE if a new JDK is announced.
const LATEST_JRE = 17;
const LATEST_JRE = 21;

/**
* Usage:
* npx gulp download_jre // Download the latest JRE for the platform of the current running machine.
* npx gulp download_jre --target darwin-x64 --javaVersion 17 // Download the specified JRE for the specified platform.
* npx gulp download_jre --target darwin-x64 --javaVersion 21 // Download the specified JRE for the specified platform.
*
* Supported platforms:
* win32-x64,
Expand Down Expand Up @@ -80,11 +80,11 @@ gulp.task('download_jre', async function (done) {

/**
* Here are the contents for a sample justj.manifest file:
* ../20211012_0921/org.eclipse.justj.openjdk.hotspot.jre.full.stripped-17-linux-aarch64.tar.gz
* ../20211012_0921/org.eclipse.justj.openjdk.hotspot.jre.full.stripped-17-linux-x86_64.tar.gz
* ../20211012_0921/org.eclipse.justj.openjdk.hotspot.jre.full.stripped-17-macosx-aarch64.tar.gz
* ../20211012_0921/org.eclipse.justj.openjdk.hotspot.jre.full.stripped-17-macosx-x86_64.tar.gz
* ../20211012_0921/org.eclipse.justj.openjdk.hotspot.jre.full.stripped-17-win32-x86_64.tar.gz
* ../20241101_1100/org.eclipse.justj.openjdk.hotspot.jre.full.stripped-21.0.5-linux-aarch64.tar.gz
* ../20241101_1100/org.eclipse.justj.openjdk.hotspot.jre.full.stripped-21.0.5-linux-x86_64.tar.gz
* ../20241101_1100/org.eclipse.justj.openjdk.hotspot.jre.full.stripped-21.0.5-macosx-aarch64.tar.gz
* ../20241101_1100/org.eclipse.justj.openjdk.hotspot.jre.full.stripped-21.0.5-macosx-x86_64.tar.gz
* ../20241101_1100/org.eclipse.justj.openjdk.hotspot.jre.full.stripped-21.0.5-win32-x86_64.tar.gz
*/
const javaPlatform = platformMapping[targetPlatform];
const list = manifest.split(/\r?\n/);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
"null"
],
"default": null,
"description": "Specifies the folder path to the JDK (17 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-17.0_3\"",
"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\"",
"scope": "machine-overridable",
"deprecationMessage": "This setting is deprecated, please use 'java.jdt.ls.java.home' instead.",
"order": 0
Expand All @@ -322,7 +322,7 @@
"null"
],
"default": null,
"description": "Specifies the folder path to the JDK (17 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-17.0_3\"",
"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\"",
"scope": "machine-overridable",
"order": 10
},
Expand Down
4 changes: 2 additions & 2 deletions src/requirements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export async function resolveRequirements(context: ExtensionContext): Promise<Re
const preferenceName = javaPreferences.preference;
let javaHome = javaPreferences.javaHome;
let javaVersion: number = 0;
const REQUIRED_JDK_VERSION = ('on' === getJavaConfiguration().get('jdt.ls.javac.enabled'))?23:17;
const REQUIRED_JDK_VERSION = ('on' === getJavaConfiguration().get('jdt.ls.javac.enabled'))?23:21;
if (javaHome) {
const source = `${preferenceName} variable defined in ${env.appName} settings`;
javaHome = expandHomeDir(javaHome);
Expand Down Expand Up @@ -217,4 +217,4 @@ async function getMajorVersion(javaHome: string): Promise<number> {
}
const runtime = await getRuntime(javaHome, { withVersion: true });
return runtime?.version?.major || 0;
}
}

0 comments on commit fdfccb2

Please sign in to comment.