Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Contributor

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”).


Comment on lines +238 to 239
Copy link
Preview

Copilot AI May 23, 2025

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.

Suggested change
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.

```yaml
steps:
Expand Down