You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
how do i use the "install-multiple-jdks" in the Github action #586
This is a usage question, so answering and closing it here. To install multiple JDKs and have a later step use a specific one, pass a multi-line java-version — setup-java installs each and exports JAVA_HOME_<major>_<arch> for every version (the last one becomes the active JAVA_HOME/PATH):
Note: this installs multiple versions of one distribution. Installing multiple distributions in one step is a separate feature request, now tracked in #1049. For questions, the GitHub Actions community discussions are also a good venue.
Activity
v-aparnajyothi-y commentedon Jan 16, 2024
Hello @angold5
Thank you for reporting this issue, We will investigate it and come back to you as soon as we have some information.
AndreiLepkovTR commentedon Jan 29, 2025
I cannot assign JAVA_HOME variable to switch Java versions. It shows empty value. How it should be done?
brunoborges commentedon Jun 23, 2026
This is a usage question, so answering and closing it here. To install multiple JDKs and have a later step use a specific one, pass a multi-line
java-version—setup-javainstalls each and exportsJAVA_HOME_<major>_<arch>for every version (the last one becomes the activeJAVA_HOME/PATH):See the docs: https://github.com/actions/setup-java?tab=readme-ov-file#install-multiple-jdks
Note: this installs multiple versions of one distribution. Installing multiple distributions in one step is a separate feature request, now tracked in #1049. For questions, the GitHub Actions community discussions are also a good venue.