-
Notifications
You must be signed in to change notification settings - Fork 19
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
openjdk should not set JAVA_HOME #626
Comments
We typically recommend SDKMan or jenv to resolve being able to select between multiple JVMs and having JAVA_HOME set appropriately each time. |
how could the use of sdkman or jenv influence if the microsoft openjdk package sets java_home on install and should not set it @karianna ? |
@soloturn - Do you mean our MSI installer that sets this variable? |
i am not 100% sure where it came from. if i recall correctly i used winget to install, so i assumed it is in the msi. |
Assigned to @brunoborges as part of his standardization for Windows installers investigation. To set expectations, there's no short term changes planned, but we are looking to see if the OpenJDK is willing to align on an approach here. |
i installed zulu jdk recently, and the installer asked if i want to set java_home. so it is definitvely in the installer, not in openjdk. |
@soloturn when you installed Zulu, did you install with the graphical interface of the MSI, or did you install through WinGet? The MS JDK MSI installer graphical UI does ask if the user wants to set |
i installed through winget, and it opened the window to choose. so it was
kind of both?
…On Tue, Oct 29, 2024 at 9:13 AM Bruno Borges ***@***.***> wrote:
@soloturn <https://github.com/soloturn> when you installed Zulu, did you
install with the graphical interface of the MSI, or did you install through
WinGet?
The MS JDK MSI installer graphical UI does ask if the user wants to set
JAVA_HOME. But when one installs with winget, it is enabled by default,
as that is the intent of the majority of users. Advanced users may want to
use a different installation method
—
Reply to this email directly, view it on GitHub
<#626 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGJRYFPU3QWROTFGOTJERDZ547RHAVCNFSM6AAAAABP25L2OKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBTGUZDGOJRGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
JAVA_HOME is an unnecessary variable, as this can be detected from the running java program. setting it causes subsequent errors, like the microsoft vscode java plugin thinks all of a sudden JAVA_HOME should be used to detect an installed java, instead of just looking into the path, resp running java.
but, openjdk should set a link so the path can be set sometimes to java-21 and java-17 with ease, e.g. /program-files/openjdk-21 pointing to /program-files/Microsoft\jdk-21.0.4.7-hotspot\bin
The text was updated successfully, but these errors were encountered: