-
Notifications
You must be signed in to change notification settings - Fork 18
Metals fails to start when -XX:+PrintCommandLineFlags is defined #203
Comments
Thanks for reporting! We might be putting these options in a wrong place and breaking up classpath. Should be easy to fix, most likely in the VS Code extension. |
It seems that the problem here is https://github.com/scalameta/metals-languageclient/blob/master/src/getServerOptions.ts#L33 and maybe in some other places. My recommendation for now is not to use |
Oh, I haven't even tried it without |
I have a problem due to that and it was very hard to understand - thanks for @tgodzik for helping.
So the problem was that I use a proxy script to actually chose some properties of the jvm to start (parse the command line for some specific modifiers), and that scripts print a line to tell what it did ("using jdk XXX with param YYY"). |
Whenever a
JDK_JAVA_OPTIONS
orJAVA_TOOL_OPTIONS
environment variable is defined, Metals fails to start. Even if the content is something as innocent as-XX:+PrintCommandLineFlags
. The log looks like this.(Exception is, if the variable is defined as an empty string or a white space, like
" "
, then Metals works normally as well.)Metals should work well, even in the presence of these (officially supported 1, 2) environment variables.
On Ubuntu 20.04.
The text was updated successfully, but these errors were encountered: