[
https://issues.apache.org/jira/browse/KARAF-2270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13634114#comment-13634114
]
Brian Emond commented on KARAF-2270:
------------------------------------
Guys, I understand what you're saying about the user setting up java before
running karaf, but that doesn't mean requiring java to be on the SYSTEM path
before execution. For the service wrapper, that is exactly why you set the
JAVA_HOME variable at the top of your wrapper.conf. And in fact, the
karaf-service linux script makes sure JAVA_HOME is set as the first thing they
do! You even corrected this as part of karaf issue KARAF-2017, but then you're
not using it to invoke java itself.
If you look at this <a
href=http://wrapper.tanukisoftware.com/doc/english/props-envvars.html>Java
Service Wrapper documentation page</a>, even they demonstrate that you should
be invoking java on the wrapper.java.command property using the JAVA_HOME
variable. What sense does it make to set JAVA_HOME in your conf file, reference
it for additional java parameters, but yet not use it to invoke java itself and
instead require java to be configured on the system path?
I apologize if I'm fundamentally missing something here, but this seems to be a
big mistake to me. I'll reopen for additional discussion.
> Service wrapper assumes java is on system path
> ----------------------------------------------
>
> Key: KARAF-2270
> URL: https://issues.apache.org/jira/browse/KARAF-2270
> Project: Karaf
> Issue Type: Bug
> Components: karaf-os-integration
> Affects Versions: 2.3.1
> Environment: windows, linux
> Reporter: Brian Emond
> Assignee: Jean-Baptiste Onofré
> Fix For: 2.3.2, 2.4.0, 3.0.0
>
>
> In the service wrapper conf file, the wrapper.java.command property points
> directly to java, and not to a fully qualified path to java. This assumes
> that java is on the system path, which it may not. The value should be:
> wrapper.java.command=%JAVA_HOME%/bin/java
> This ensures the wrapper is using the java executable established from
> setting the JAVA_HOME variable under the Wrapper Properties a few lines up in
> the conf file.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira