-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fix spring-boot#481: add JRE_HOME #395
Conversation
f88649c
to
864c09c
Compare
* JRE_HOME is often used as a convention to convey the path of a JRE; in this case it's convenient to distinguish the JRE from a JDK (when both are required), since the PATH can insert the JRE_HOME/bin or JDK_HOME/bin in a non predictable order. * Thanks to JRE_HOME, subsequent build steps will be able to use JRE_HOME/bin/java to make sure they pick a JRE and not a JDK * in case there's just a JDK desired by the user, JRE_HOME will also be set, as the JDK_HOME
864c09c
to
0fa5ddf
Compare
* JRE_HOME is now set in libjvm, see paketo-buildpacks/libjvm#395 * thanks to that, we know for sure that the JRE_HOME/bin/java will be used for the training run
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.
Looks good to me.
So if I have this correct. At build time:
I'm curious what the behavior of PATH is here, given that both the JRE & JDK will be on PATH. I guess it depends on how the lifecycle processes the layers and puts them on the PATH? What have you observed @anthonydahanne ? |
Should we also update the JLink installer? That presently sets |
Almost: if the buildplan requires both JRE and JDK: JRE_HOME -> the JDK
Well, PATH is kind of... not predictable. What I have observed is JDK path sometimes before, sometimes after JRE path in the PATH env.
That, I don't know. But... I supposed it's not required if nobody had any issues with it so far. |
Interesting 🤔 I'm going to mention this upstream and see what they say.
Oh, that's not what I would have expected. Why would JRE_HOME point to the JDK? Isn't that what you're trying to avoid? Cause the JDK would run the CDS training, but then the JRE would run the app at runtime and they'd be different? |
* JRE_HOME is now set in libjvm, see paketo-buildpacks/libjvm#395 * thanks to that, we know for sure that the JRE_HOME/bin/java will be used for the training run
oh I'm sorry, I pressed enter too fast
|
Checklist