-
Notifications
You must be signed in to change notification settings - Fork 420
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
Language Server fails to start with multiple --add-exports in java.jdt.ls.vmargs #3577
Comments
I'm able to reproduce this as well. It's due to : vscode-java/src/javaServerStarter.ts Lines 310 to 318 in 34f54ac
--add-exports is pushed, the subsequent ones are skipped causing it to appear as if one of the arguments is being run as the main class.
@snjeza can you think of any JVM arguments that when duplicated would produce an issue starting up ? The code dates back to 2016 so maybe we should relax the restriction. |
I agree, we should relax the restriction. |
Thanks for the quick turnaround! Is there anything I can do with my local extension installation to make a similar change while I wait for the next release? |
Once the change is merged, the pre-release stream should contain the fix the next day so you could definitely try that. I checked if there was some workaround to bypass the incorrect behaviour in a current released version, but there doesn't seem to be any. |
The Language Server fails to start when multiple
---add-exports
are specified in thejava.jdt.ls.vmargs
setting.For example these VSCode settings (in
.vscode/settings.json
) start the Language Server correctly:These settings do not:
I see this error in the Language Support for Java output pane:
I don't see any errors reported in the Chrome dev tools console, or in the Language Server workspace logs.
Environment
Steps To Reproduce
--add-exports
arguments to thejava.jdt.ls.vmargs
value in VSCodesettings.json
.Current Result
The Language Server fails to start, and reports the above error to the Output pane.
Expected Result
The Language Server starts with all
--add-exports
supplied to the JVM.The text was updated successfully, but these errors were encountered: