As suggested in https://github.com/scalameta/metals/issues/41#issuecomment-375973005 we could allow configuring the JDK path.
I think it would make sense to additionally fallback to .orElse(sys.env("JAVA_HOME")) if that would avoid the need for all windows users to configure the path in settings.
If I understand correctly, we should detect Java home in the following order
System.getenv().get("JAVA_HOME")System.getProperty("java.home")
Most helpful comment
I think it would make sense to additionally fallback to
.orElse(sys.env("JAVA_HOME"))if that would avoid the need for all windows users to configure the path in settings.