Skip to content
This repository was archived by the owner on Mar 21, 2023. It is now read-only.

Conversation

@hedefalk
Copy link

Fixes scalameta/metals-vscode#657

Both original https://github.com/jvilk/locate-java-home and fork jvilk/locate-java-home#10 (comment)

seems somewhat stale/dead so I just cross-published the fixed version under my user-scope on npm.

Don't know if there's a cleaner way, but it would really be nice to close scalameta/metals-vscode#657

@tgodzik
Copy link
Contributor

tgodzik commented Dec 14, 2021

Maybe we should fork it under scalameta to have it in a more official manner? @ckipp01 @gabro what do you think?

@ckipp01
Copy link
Member

ckipp01 commented Dec 14, 2021

Maybe we should fork it under scalameta to have it in a more official manner? @ckipp01 @gabro what do you think?

I'm open for whatever works best for everyone. @hedefalk are you forking it only for this? Or do you plan to keep maintaining it, etc?

@dos65
Copy link
Member

dos65 commented Dec 14, 2021

@hedefalk I've checked this thing and it seems that it works well in current Metals release. At least on Linux.

I'm starting VSCode as: JAVA_HOME=${value} code . and see that it's correctly picked using this function

Could you describe the case when it doesn't work?

@hedefalk
Copy link
Author

@dos65 Hm… I'm confused now. That code seems to be working by reading it, but its been there for 2 years. I reported scalameta/metals-vscode#657 this summer and at that point I think I definitely had the problem… I guess I need to re-investigate, because it doesn't make sense to me now :)

@hedefalk hedefalk marked this pull request as draft December 15, 2021 15:03
@hedefalk
Copy link
Author

@ckipp01 Not sorry, not really planning on maintaining it, I just published because I couldn't get author to: scalameta/metals-vscode#657 (comment)

@tgodzik
Copy link
Contributor

tgodzik commented Jan 5, 2022

I checked it again and it seems that locate-java-home is properly picking up JAVA_HOME variable, couldn't reproduce it either.

We could switch for sure, especially if the new fork is bettermaintained.

@tgodzik
Copy link
Contributor

tgodzik commented Jan 5, 2022

Updating to the new fork in #395 Thanks for the help!

@tgodzik tgodzik closed this Jan 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Metals ignores JAVA_HOME because locate-java-home npm…

4 participants