-
Notifications
You must be signed in to change notification settings - Fork 76
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
Java home not recognised #1464
Comments
We should use the JAVA_HOME and only download if it's not available. Seems that something is wrong there. Maybe, it was due to the default being Java 17, which forced us to download JDK 17 since 21 was not matching what we would expect? We can allow using any higher than the default. |
@kasiaMarek could you take a look? |
Also looks like it doesn't show progress (at least to me). We also should probably use |
Yes, that setting is now meant to point to java home you want to use for your project. Java version refers to the one that is used to start metals with. I guess it should be described a bit better.
That's a bug, it should use your |
Quite the contrary I think. We are using the flag and we shouldn't. |
My system Here's the log output...
|
I was actually trying to write the opposite, but I lost the "n't" 😅 |
I made some changes that should already be on the newest snapshot. It won't probably resolve the issue of discovering your |
It doesn't change my env vars now - which is good. But still downloads jdk 17 and uses that. My only VSCode settings are Logs...
If I add the setting
|
Yeah, thanks of doing this. So the issue is that we check java version by running |
Describe the bug
Metals doesn't recognise my JAVA_HOME setting.
To Reproduce Steps to reproduce the behavior:
Metals starts up and immediately Coursier downloads a JDK 17 which then overwrites the JAVA_HOME on my machine and adds this jdk 17 to my machines path.
This is pretty invasive and stops any apps that require jdk 21 from working on my machine.
I see there is a new Java Version setting in Metals which defaults to 17. I can change this to 21 but coursier will still download a JDK instead of using my own. It does download a version 21 though.
Metals now seems to ignore the VSCode "Java home" setting - I can't get that to affect any of this.
Not sure if this is a Windows only issue and it can't detect I have a JAVA_HOME setting. The release version of Metals works fine.
If the idea is for Metals to download a JDK version if one is not present then maybe the 2 VSCode settings (java home & java version) could be merged into something like...
Expected behavior
I'd expect Metals to recognise my JAVA_HOME and use that be default.
The changes to my machines JAVA_HOME and path are worrying.
Installation:
Search terms
java_home
The text was updated successfully, but these errors were encountered: