From fc96c05922d1a42d0fbaaa02a67a31e69c667f84 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 16 Jun 2016 17:23:22 -0500 Subject: Fixed Java dependency. The code has been modified to use the JAVA_HOME path specified in the pki.conf. The spec file has been modified to depend specifically on OpenJDK 1.8.0 and to provide the default JAVA_HOME path for the pki.conf. https://fedorahosted.org/pki/ticket/2363 --- base/java-tools/bin/pki | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'base/java-tools/bin') diff --git a/base/java-tools/bin/pki b/base/java-tools/bin/pki index 88490f7da..c9170831b 100644 --- a/base/java-tools/bin/pki +++ b/base/java-tools/bin/pki @@ -70,6 +70,12 @@ class PKICLI(pki.cli.CLI): def execute_java(self, args, stdout=sys.stdout): + # read Java home + value = subprocess.check_output( + '. /usr/share/pki/etc/pki.conf && . /etc/pki/pki.conf && echo $JAVA_HOME', + shell=True) + java_home = value.decode(sys.getfilesystemencoding()).strip() + # read RESTEasy library path value = subprocess.check_output( '. /usr/share/pki/etc/pki.conf && . /etc/pki/pki.conf && echo $RESTEASY_LIB', @@ -117,7 +123,7 @@ class PKICLI(pki.cli.CLI): ] cmd = [ - 'java', + java_home + '/bin/java', '-cp', ':'.join(classpath), '-Djava.util.logging.config.file=' + logging_config, -- cgit