karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Rathgeb <maggu2...@gmail.com>
Subject Karaf: Java detection on Karaf
Date Tue, 05 Mar 2019 12:41:34 GMT
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

Mime
View raw message