Skip to content

Upgrade the bundled JDK version to 25 LTS #4439

Closed

Description

@XhstormR

Is your feature request related to a problem? Please describe.
The currently bundled JDK version is 21, which does not recognize the UseCompactObjectHeaders VM option; upgrading to the latest LTS version (25) resolves this issue.

{
  message: 'Starting Java server with: /Users/leo/.vscode/extensions/redhat.java-1.55.0-darwin-arm64/jre/21.0.11-macosx-aarch64/bin/java --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.nio.fs=ALL-UNNAMED -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Djava.import.generatesMetadataFilesAtProjectRoot=false -DDetectVMInstallationsJob.disabled=true -Dfile.encoding=utf8 -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m -Xlog:disable -javaagent:/Users/leo/.vscode/extensions/redhat.java-1.55.0-darwin-arm64/lombok/lombok-1.18.39-4050.jar -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/Users/leo/Library/Application Support/Code/User/workspaceStorage/86672a3e9479386619cea829e48e468b/redhat.java -Daether.dependencyCollector.impl=bf -jar /Users/leo/.vscode/extensions/redhat.java-1.55.0-darwin-arm64/server/plugins/org.eclipse.equinox.launcher_1.7.200.v20260619-2039.jar -configuration /Users/leo/Library/Application Support/Code/User/globalStorage/redhat.java/1.55.0/config_mac -data /Users/leo/Library/Application Support/Code/User/workspaceStorage/86672a3e9479386619cea829e48e468b/redhat.java/jdt_ws',
  level: 'info',
  timestamp: '2026-06-29 11:05:18.884'
}
{
  message: 'Picked up JAVA_TOOL_OPTIONS: -XX:+UseZGC -XX:+UseStringDeduplication -XX:+UseCompactObjectHeaders\n' +
    "Unrecognized VM option 'UseCompactObjectHeaders'\n" +
    'Error: Could not create the Java Virtual Machine.\n' +
    'Error: A fatal exception has occurred. Program will exit.\n',
  level: 'info',
  timestamp: '2026-06-29 11:05:19.273'
}

Describe the solution you'd like
Upgrade the bundled JDK version to 25 LTS

Activity

  1. wenytang-ms commented on Jun 29, 2026

    @wenytang-ms
    Contributor

    Thanks for raising this. This looks related to #4353 / #4383, which are about moving the bundled runtime from Java 21 to Java 25.

    One thing worth calling out is that the failing option here is coming from JAVA_TOOL_OPTIONS. Since that env var is picked up by every Java process, it also affects the JDT LS process launched by this extension. Moving the bundled runtime to 25 would probably make this specific option accepted, but it also changes the default runtime story for other flows.

    For example, Gradle/Buildship may end up running Gradle with the bundled runtime unless java.import.gradle.java.home is configured, and older Gradle versions can have issues when run on JDK 25. So this feels like a tradeoff rather than a purely isolated upgrade request.

    A narrower workaround might be to avoid putting JDK-25-specific options in global JAVA_TOOL_OPTIONS, and instead pass them only to the app/process that needs them. Another option is to point java.jdt.ls.java.home to a JDK 25 if the language server itself needs to run with that runtime.

  2. XhstormR commented on Jun 29, 2026

    @XhstormR
    Author

    Yes. #4353 / #4383

  3. added this to the End of October 2026 milestone on Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions