Skip to content

Support platform specific extension #2109

Closed

Description

@testforstephen

See microsoft/vscode#23251 (comment), VS Code Marketplace now allows extensions to publish different VSIXs for each platform (Windows, Linux, macOS). We might consider taking advantage of this by packaging a platform-specific Java runtime in the extension itself.

This document has all the details:
https://code.visualstudio.com/api/working-with-extensions/publishing-extension#platformspecific-extensions

Activity

  1. testforstephen commented on Oct 14, 2021

    @testforstephen
    CollaboratorAuthor

    Here are some updates about embedding a JRE in Java language server.

    • Embedded tooling JRE
      A minimal JRE that can be used to launch Java language server:
      org.eclipse.justj.openjdk.hotspot.jre.minimal.stripped-17
      https://download.eclipse.org/justj/jres/17/downloads/latest/

      Update 1: We plan to embed org.eclipse.justj.openjdk.hotspot.jre.full.stripped-17 instead of org.eclipse.justj.openjdk.hotspot.jre.minimal.stripped-17. The minimal stripped is about 30M, and the full jre stripped is about 55M (only plus 25M). But the full jre stripped includes a full set of Java modules, and can cover maven project import better.

      The principle is to draw a line between the tooling runtime and project JDK. The embedded JRE is only used to launch the tooling itself. Developers are responsible for installing a JDK to launch their own applications, which could be any JDK version they want to use.

      To keep the compatibility, Java extension will still first try to start itself using the local JDK from java.home setting or Java home environment variable. If that JDK doesn't meet the minimum JDK requirement to start JDT language server (the current minimum JDK requirement is 11, and probably change to 17 in the future), then fall back to the embedded JRE. It will no longer pop up a message asking the user to install the latest JDK.

      Update 2: For platform extensions, always use the embedded JRE to launch Java extension. "java.home" setting is useless and may cause confusion, we will mark it as deprecated. And it can only be used for universal versions without embedded JRE.

    • Supported Platforms

      • win32-x64
      • win32-ia32 (JustJ doesn't support it, but adoptium does)
      • win32-arm64
      • linux-x64
      • linux-arm64
      • linux-armhf (Raspberry pi)
      • alpine-x64 (JustJ doesn't support it, but adoptium does)
      • alpine-arm64
      • darwin-x64
      • darwin-arm64
    • Validation - Verify the embedded platform JRE can launch Java language server in the specified platform

      • windows 10 (x64)
      • linux x64 (ubuntu, flatpak)
      • linux arm64
      • macOS x64
      • Apple M1 (arm64)
    • Release
      TBD

  2. added this to the Early December milestone on Dec 7, 2021
  3. linked a pull request that will close this issueSupport platform specific extension #2183on Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions