summaryrefslogtreecommitdiffstats
path: root/base/java-tools
diff options
context:
space:
mode:
Diffstat (limited to 'base/java-tools')
-rw-r--r--base/java-tools/bin/pki8
-rw-r--r--base/java-tools/templates/pki_java_command_wrapper.in11
-rw-r--r--base/java-tools/templates/pretty_print_cert_command_wrapper.in8
-rw-r--r--base/java-tools/templates/pretty_print_crl_command_wrapper.in8
4 files changed, 28 insertions, 7 deletions
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,
diff --git a/base/java-tools/templates/pki_java_command_wrapper.in b/base/java-tools/templates/pki_java_command_wrapper.in
index c6dfc6409..fcf3b3a2e 100644
--- a/base/java-tools/templates/pki_java_command_wrapper.in
+++ b/base/java-tools/templates/pki_java_command_wrapper.in
@@ -19,6 +19,12 @@
# --- END COPYRIGHT BLOCK ---
#
+# Read default PKI configuration.
+. /usr/share/pki/etc/pki.conf
+
+# Read user-defined PKI configuration.
+. /etc/pki/pki.conf
+
# Check to insure that this script's original invocation directory
# has not been deleted!
CWD=`/bin/pwd > /dev/null 2>&1`
@@ -68,7 +74,7 @@ OS=`uname -s`
if [ "${OS}" = "Linux" ] ; then
ARCHITECTURE=`arch`
- JAVA="java"
+ JAVA="${JAVA_HOME}/bin/java"
JAVA_OPTIONS=""
elif [ "${OS}" = "SunOS" ] ; then
ARCHITECTURE=`uname -p`
@@ -110,7 +116,6 @@ fi
## order this command wrapper uses to find jar files. ##
###############################################################################
-JNI_JAR_DIR=`. /usr/share/pki/etc/pki.conf && . /etc/pki/pki.conf && echo $JNI_JAR_DIR`
CP=${JNI_JAR_DIR}/jss4.jar
CP=/usr/share/java/commons-cli.jar:${CP}
CP=/usr/share/java/commons-codec.jar:${CP}
@@ -124,8 +129,6 @@ CP=/usr/share/java/${PRODUCT}/pki-cmsutil.jar:${CP}
CP=/usr/share/java/${PRODUCT}/pki-tools.jar:${CP}
export CP
-LOGGING_CONFIG=`. /usr/share/pki/etc/pki.conf && . /etc/pki/pki.conf && echo $LOGGING_CONFIG`
-
###############################################################################
## (6) Execute the java command specified by this java command wrapper ##
## based upon the preset LD_LIBRARY_PATH and CP environment variables. ##
diff --git a/base/java-tools/templates/pretty_print_cert_command_wrapper.in b/base/java-tools/templates/pretty_print_cert_command_wrapper.in
index 6dc86de27..63451d0c5 100644
--- a/base/java-tools/templates/pretty_print_cert_command_wrapper.in
+++ b/base/java-tools/templates/pretty_print_cert_command_wrapper.in
@@ -19,6 +19,12 @@
# --- END COPYRIGHT BLOCK ---
#
+# Read default PKI configuration.
+. /usr/share/pki/etc/pki.conf
+
+# Read user-defined PKI configuration.
+. /etc/pki/pki.conf
+
# Check to insure that this script's original invocation directory
# has not been deleted!
CWD=`/bin/pwd > /dev/null 2>&1`
@@ -68,7 +74,7 @@ OS=`uname -s`
if [ "${OS}" = "Linux" ] ; then
ARCHITECTURE=`arch`
- JAVA="java"
+ JAVA="${JAVA_HOME}/bin/java"
JAVA_OPTIONS=""
elif [ "${OS}" = "SunOS" ] ; then
ARCHITECTURE=`uname -p`
diff --git a/base/java-tools/templates/pretty_print_crl_command_wrapper.in b/base/java-tools/templates/pretty_print_crl_command_wrapper.in
index 2a74d4d60..0c518ced3 100644
--- a/base/java-tools/templates/pretty_print_crl_command_wrapper.in
+++ b/base/java-tools/templates/pretty_print_crl_command_wrapper.in
@@ -19,6 +19,12 @@
# --- END COPYRIGHT BLOCK ---
#
+# Read default PKI configuration.
+. /usr/share/pki/etc/pki.conf
+
+# Read user-defined PKI configuration.
+. /etc/pki/pki.conf
+
# Check to insure that this script's original invocation directory
# has not been deleted!
CWD=`/bin/pwd > /dev/null 2>&1`
@@ -68,7 +74,7 @@ OS=`uname -s`
if [ "${OS}" = "Linux" ] ; then
ARCHITECTURE=`arch`
- JAVA="java"
+ JAVA="${JAVA_HOME}/bin/java"
JAVA_OPTIONS=""
elif [ "${OS}" = "SunOS" ] ; then
ARCHITECTURE=`uname -p`