karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: Karaf: Java detection on Karaf
Date Tue, 05 Mar 2019 13:17:13 GMT
Hi Markus,

Maybe I didn't understand, but you can define JAVA_HOME in bin/inc right ?

I don't think java-config is used if you have JAVA_HOME defined right ?
(it's what I have on my systems).

Regards
JB

On 05/03/2019 13:41, Markus Rathgeb wrote:
> Hi,
> 
> I recently decided to remove my system wide Java installation from my
> Gentoo machine.
> I don't need it system wide.
> 
> I am the only user of that system that needs Java -- to be more
> precise I am the only user of the system at all.
> 
> Additionally I switch between different Java versions and dstributions
> for testing purposes.
> 
> I ensure that a java is present in a directory that is part of the
> PATH environment variable.
> Additionally I set JAVA_HOME to the desired location.
> 
> All tools still work as expected.
> 
> BUT: I realized that Karaf does not work as expected anymore.
> 
> It is caused by the function "locateJava" in
> "./assemblies/features/base/src/main/filtered-resources/resources/bin/inc".
> If the environment JAVA is not set and the file "/etc/gentoo-release"
> is readable, JAVA_HOME is set to the output of "java-config
> --jre-home".
> "java-config" does not exist on my system at all.
> It is only present if you install global Java support on the Gentoo
> machine, so it is optional.
> 
> I also wonder why JAVA_HOME is not, if it is already set?
> 
> There are several options:
> * If JAVA_HOME is set, keep it as it is.
> * If JAVA / JAVA_HOME is not set /etc/gentoo-release is present AND
> java-config is executable, execute it.
> * ...
> 
> WDYT?
> Why is there a requirement for "java-config" on Gentoo?
> Why is "java-config" used if I already set JAVA_HOME to a specific
> Java location?
> 
> Best regards,
> Markus
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message