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

Define JAVA_HOME and JRE_HOME behaviour in msi installers #50

Closed
lumpfish opened this issue Feb 19, 2019 · 7 comments

Comments

@lumpfish
Copy link
Contributor

commented Feb 19, 2019

The AdoptOpenJDK msi installers currently

  1. Set JAVA_HOME when installing the jdk, disabled by default
  2. Set JRE_HOME when installing the jre, disabled by default

So far I have only been able to identify Tomcat as an application which uses JRE_HOME.

There are many applications which use JAVA_HOME, (including Tomcat if JRE_HOME is not set), but the AdoptOpenJDK jre installer does not offer this as an option.

One approach might be to offer setting both JRE_HOME and JAVA_HOME when installing the jre?

@alexhass - when you originally provided the msi installer code, what was the rationale behind the current JAVA_HOME and JRE_HOME options?

For reference, this is the behaviour of other installers taken from a thread by @douph1 in the installer slack channel:

Installer who propose to set JAVA_HOME :

  • Azul Zulu : dont
  • Java.com (JRE): dont
  • Oracle.com (JDK): dont
  • Liberica Bellsoft : dont
  • Amazon Corretto : YES as an option ENABLED by default
  • OJDK (RedHat) : YES as an option DISABLED by default
  • AdoptOpenJDK (currently): YES as an option DISABLED by default

Installer who propose to set JRE_HOME

  • AdoptOpenJDK (currently) : instead of JAVA_HOME if build is JRE not JDK (edited)

@karianna karianna added this to To do in openjdk-installers via automation Feb 19, 2019

@alexhass

This comment has been minimized.

Copy link
Contributor

commented Feb 19, 2019

I only followed Oracle documentation when I added JRE_HOME. It‘s easy to add both if needed. I changed thos very late as I never heard of this in my life. I‘m also fine to replace it if this ist best practice.

@lumpfish

This comment has been minimized.

Copy link
Contributor Author

commented Feb 20, 2019

So if the only application we know which uses JRE_HOME is Tomcat, and Tomcat works anyway if JAVA_HOME is set, and we know lots of applictions use JAVA_HOME, then I suggest we set JAVA_HOME for both jdk and jre and never set JRE_HOME. Any support for this or alternative views?

@douph1

This comment has been minimized.

Copy link
Contributor

commented Feb 20, 2019

100% Ok, Only JAVA_HOME
Other exemple:
IDEA IntelliJ use : Try (in order): IDEA_JDK, idea.jdk, ./jre64, JDK_HOME, JAVA_HOME, "java" in PATH.
Gradle : use JAVA_HOME
...

@alexhass

This comment has been minimized.

Copy link
Contributor

commented Feb 20, 2019

Ok

@lumpfish

This comment has been minimized.

Copy link
Contributor Author

commented Feb 21, 2019

@gdams, @karianna - are you in agreement? If so, @gdams , can you include this with the other work you're doing on installers at the moment or would you like a PR?

@karianna

This comment has been minimized.

Copy link
Member

commented Feb 21, 2019

I'm happy about your decision :-). If the majority of users complain later we can revisit.

PR would be welcome.

@douph1

This comment has been minimized.

Copy link
Contributor

commented Feb 27, 2019

done through
#56

@douph1 douph1 closed this Feb 27, 2019

openjdk-installers automation moved this from To do to Done Feb 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.