[ 
https://issues.apache.org/jira/browse/KARAF-7134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17343619#comment-17343619
 ] 

Sascha Vogt commented on KARAF-7134:
------------------------------------

After discussing this in the Karaf Slack channel a few more arguments were 
exchanged which I wanted to summarize here before closing:

First of all it's possible to set JAVA_HOME in "setenv[.bat]" to any location 
desired. In case Karaf is shipped as an on-prem product where one would like to 
be able to update the setenv script without allowing modifications from 
customers, it should be delivered with some "source setenv-customer" - so 
JAVA_HOME could be set there and customers could change that.

In addition there was some discussion what should actually take precendence - a 
JVM in KARAF_HOME/runtime or a JAVA_HOME env variable being set somewhere else. 
I'd argue the runtime thing - but I acknowledge that other tools (like the 
Eclipse launcher actually only uses the embedded JVM if JAVA_HOME is NOT 
set...) - depends a bit on the use case, if the on-prem product forces all 
"customers" to use the embedded one and doesn't allow them to override that of 
course runtime should take precedence. If you only ship a "recommended" JVM 
with the product it makes sense for admins to override it with their own one in 
case they have for example bought some licensed jvm with support or if they 
want to roll out some security fix on their own without waiting for a vendor 
upgrade. 

So as the precedence discussion is not really solveable I think the current 
option by setting the JAVA_HOME in setenv is good enough. If I forgot anything 
to mention, please comment :) Otherwise case closed

> Run with embedded JVM if present
> --------------------------------
>
>                 Key: KARAF-7134
>                 URL: https://issues.apache.org/jira/browse/KARAF-7134
>             Project: Karaf
>          Issue Type: Improvement
>          Components: karaf
>            Reporter: Sascha Vogt
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>
> This is an enhancement proposal: 
> The Karaf startup scripts should prefer an embedded JVM if one is present 
> (location to be defined, but could be {{KARAF_HOME/jvm}} or 
> {{KARAF_HOME/runtime/jvm}} or something similar) 
> If non is present, behave like today, use JAVA_HOME and last search for java 
> on the PATH
> This enhancement allows to ship selfcontained archives of Karaf which use a 
> defined JVM rather than whats available on the target host.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to