Skip to content

Use redhat.java embedded JRE to launch the MicroProfile language server #84

@rgrunber

Description

@rgrunber

Since redhat-developer/vscode-java#2109 , vscode-java provides an embedded JRE on many common platforms. Since we depend on the extension, we should check whether the embedded JRE can be exists so we may use it for consistency. This should allow us to support users with no JRE.

The example at https://github.com/microsoft/vscode-java-test/blob/main/src/extension.ts#L41-L46 should work for us.

const javaLanguageSupport: Extension<any> | undefined = extensions.getExtension(ExtensionName.JAVA_LANGUAGE_SUPPORT);
    if (javaLanguageSupport?.isActive) {
        const extensionApi: any = javaLanguageSupport.exports;
        if (!extensionApi) {
            return;
        }
   ...
   ...

The ExtensionAPI contains javaRequirements, which contains a reference to tooling_jre which is what we need.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions