Skip to content

Conversation

@sid-srini
Copy link
Member

@sid-srini sid-srini commented Aug 25, 2025

  1. Brings NetBeans PR Constructor init of java.lsp.server JavaPlatformProvider override apache/netbeans#8745 as a patch

  2. Allowed LspJavaPlatformProviderOverride to initialize the override based on the value set for the option "netbeans.lsp.java.platform.override" passed as a JVM system property.

  3. Utilised platform override system property in Java VSCode extension

    1. From the Java VSCode extension, passed the value of "jdk.project.jdkhome" configuration to the NBLS via the JVM system property flag "netbeans.lsp.java.platform.override".
    2. This additionally allows the LspJavaPlatformProviderOverride to initialize the JavaPlatform override during construction, avoiding any caching of the default platform prior to the configuration being read via LSP.

Thanks to @lahodaj for the idea of this fix.

@sid-srini sid-srini requested a review from Achal1607 August 25, 2025 12:11
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Aug 25, 2025
@sid-srini sid-srini added this to the JVSC 24.1.1 milestone Aug 25, 2025
@sid-srini sid-srini linked an issue Aug 25, 2025 that may be closed by this pull request
Achal1607
Achal1607 previously approved these changes Aug 25, 2025
Copy link
Member

@Achal1607 Achal1607 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks

@sid-srini sid-srini force-pushed the jvsc415_projectJdkHome_java_platform_override_init branch from 1c4202d to 427e230 Compare August 25, 2025 13:28
Achal1607
Achal1607 previously approved these changes Aug 25, 2025
Copy link
Member

@Achal1607 Achal1607 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for fixing this

@sid-srini sid-srini force-pushed the jvsc415_projectJdkHome_java_platform_override_init branch from 427e230 to ff7e639 Compare August 25, 2025 13:31
Copy link
Member

@lahodaj lahodaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK to me.

1. Allowed LspJavaPlatformProviderOverride to initialize the override
   based on the value set for the option "netbeans.lsp.java.platform.override"
   passed as a JVM system property.

2. Utilised platform override system property in Java VSCode extension
    1. From the Java VSCode extension, passed the value of
       "jdk.project.jdkhome" configuration to the NBLS via the JVM
       system property flag "netbeans.lsp.java.platform.override".
    2. This additionally allows the LspJavaPlatformProviderOverride to initialize
       the JavaPlatform override during construction, avoiding any caching
       of the default platform prior to the configuration being read via LSP.
@sid-srini sid-srini force-pushed the jvsc415_projectJdkHome_java_platform_override_init branch from ff7e639 to 386be22 Compare August 26, 2025 06:12
@Achal1607 Achal1607 merged commit ce814bb into oracle:main Aug 26, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Java 8 project , Lsp server not using jdk.project.jdkhome bu

3 participants