Skip to content
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

improvement: Search PATH for Java to use #1486

Merged
merged 2 commits into from Apr 25, 2024
Merged

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Apr 21, 2024

Previously, we would rely on the separate library for detecting java, but we had no control on whether it worked and it doesn't seem actively used by a lot of people.

Now, we first check JAVA_HOME and then search PATH for the actual Java to use. If we can't find any of that we download ourselves. This seems simple enought logic.

Previously, we would rely on the separate library for detecting java, but we had no control on whether it worked and it doesn't seem actively used by a lot of people.

Now, we first check JAVA_HOME and then search PATH for the actual Java to use. If we can't find any of that we download ourselves. This seems simple enought logic.
@tgodzik tgodzik requested a review from kasiaMarek April 21, 2024 14:13
@tgodzik tgodzik force-pushed the add-path-back branch 3 times, most recently from 5f8ce82 to 2ac85f0 Compare April 21, 2024 14:44
Copy link
Contributor

@kasiaMarek kasiaMarek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

packages/metals-languageclient/src/util.ts Outdated Show resolved Hide resolved
packages/metals-languageclient/src/getJavaHome.ts Outdated Show resolved Hide resolved
@tgodzik tgodzik merged commit f2e5247 into scalameta:main Apr 25, 2024
10 checks passed
@tgodzik tgodzik deleted the add-path-back branch April 25, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants