-
Notifications
You must be signed in to change notification settings - Fork 785
Clarify JAVA_HOME and PATH setup in README #841
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
base: main
Are you sure you want to change the base?
Clarify JAVA_HOME and PATH setup in README #841
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the README with explicit steps to prioritize a specific JDK by configuring JAVA_HOME
and updating PATH
.
- Adds guidance on updating the
JAVA_HOME
environment variable and prepending itsbin
directory toPATH
for version precedence.
All versions are added to the PATH. The last version will be used and available globally. Other Java versions can be accessed through env variables with such specification as 'JAVA_HOME_{{ MAJOR_VERSION }}_{{ ARCHITECTURE }}'. To set up a specific Java version, update the JAVA_HOME environment variable and prepend its bin directory to the PATH to ensure the desired JDK takes priority during execution. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider wrapping environment variables like JAVA_HOME
and PATH
in code formatting for consistency, and include example shell commands (e.g., export JAVA_HOME=/path/to/jdk; export PATH="$JAVA_HOME/bin:$PATH"
) to make the instructions more actionable.
All versions are added to the PATH. The last version will be used and available globally. Other Java versions can be accessed through env variables with such specification as 'JAVA_HOME_{{ MAJOR_VERSION }}_{{ ARCHITECTURE }}'. To set up a specific Java version, update the JAVA_HOME environment variable and prepend its bin directory to the PATH to ensure the desired JDK takes priority during execution. | |
All versions are added to the `PATH`. The last version will be used and available globally. Other Java versions can be accessed through environment variables with such specification as `JAVA_HOME_{{ MAJOR_VERSION }}_{{ ARCHITECTURE }}`. To set up a specific Java version, update the `JAVA_HOME` environment variable and prepend its `bin` directory to the `PATH` to ensure the desired JDK takes priority during execution. For example: | |
```sh | |
export JAVA_HOME=/path/to/specific/jdk | |
export PATH="$JAVA_HOME/bin:$PATH" |
Copilot uses AI. Check for mistakes.
@@ -235,7 +235,7 @@ jobs: | |||
|
|||
### Install multiple JDKs | |||
|
|||
All versions are added to the PATH. The last version will be used and available globally. Other Java versions can be accessed through env variables with such specification as 'JAVA_HOME_{{ MAJOR_VERSION }}_{{ ARCHITECTURE }}'. | |||
All versions are added to the PATH. The last version will be used and available globally. Other Java versions can be accessed through env variables with such specification as 'JAVA_HOME_{{ MAJOR_VERSION }}_{{ ARCHITECTURE }}'. To set up a specific Java version, update the JAVA_HOME environment variable and prepend its bin directory to the PATH to ensure the desired JDK takes priority during execution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The term “last version” could be clarified (e.g., “the last one added to the PATH”).
Description:
This pull request updates the documentation in the
README.md
file to clarify how to set up a specific Java version when multiple JDKs are installed.README.md
: Added instructions for updating theJAVA_HOME
environment variable and prepending the desired JDK'sbin
directory to thePATH
to prioritize a specific Java version.Related issue:
#835
Check list: