Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support platform specific extension #2109

Closed
Tracked by #852
testforstephen opened this issue Sep 14, 2021 · 3 comments · Fixed by #2183
Closed
Tracked by #852

Support platform specific extension #2109

testforstephen opened this issue Sep 14, 2021 · 3 comments · Fixed by #2183

Comments

@testforstephen
Copy link
Collaborator

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

@testforstephen
Copy link
Collaborator Author

testforstephen commented Oct 14, 2021

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

@rgrunber
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants