_script-util.sh revision ce64f593d3b36892779acbae859bd34b06202871
120N/A# The contents of this file are subject to the terms of the 120N/A# Common Development and Distribution License, Version 1.0 only 120N/A# (the "License"). You may not use this file except in compliance 120N/A# You can obtain a copy of the license at 0N/A# See the License for the specific language governing permissions 0N/A# and limitations under the License. 0N/A# When distributing Covered Code, include this CDDL HEADER in each 0N/A# file and include the License file at 0N/A# add the following below this CDDL HEADER, with the fields enclosed 120N/A# by brackets "[]" replaced with your own identifying information: 0N/A# Portions Copyright [yyyy] [name of copyright owner] 0N/A# Portions Copyright 2007 Sun Microsystems, Inc. 0N/A# function that sets the java home if test -z "${OPENDS_JAVA_BIN}" if test -z "${OPENDS_JAVA_HOME}" if test -z "${JAVA_HOME}" echo "Please set OPENDS_JAVA_HOME to the root of a Java 5 (or later) installation" echo "or edit the java.properties file and then run the dsjavaproperties script to" echo "specify the java version to be used" # Determine whether the detected Java environment is acceptable for use. if test -z "${OPENDS_JAVA_ARGS}" echo "ERROR: The detected Java version could not be used. The detected" echo "${OPENDS_JAVA_BIN}" echo "You must specify the path to a valid Java 5.0 or higher version." echo "The procedure to follow is:" echo "2. Set the environment variable OPENDS_JAVA_HOME to the root of a valid " echo "Java 5.0 installation." echo "If you want to have specific java settings for each command line you must" echo "follow the steps 3 and 4." echo "3. Edit the properties file specifying the java binary and the java arguments" echo "for each command line. The java properties file is located in:" echo "ERROR: The detected Java version could not be used with the set of java" echo "arguments ${OPENDS_JAVA_ARGS}." echo "The detected java binary is:" echo "${OPENDS_JAVA_BIN}" echo "You must specify the path to a valid Java 5.0 or higher version." echo "The procedure to follow is:" echo "2. Set the environment variable OPENDS_JAVA_HOME to the root of a valid " echo "Java 5.0 installation." echo "If you want to have specific java settings for each command line you must" echo "follow the steps 3 and 4." echo "3. Edit the properties file specifying the java binary and the java arguments" echo "for each command line. The java properties file is located in:" # Explicitly set the PATH, LD_LIBRARY_PATH, LD_PRELOAD, and other important # system environment variables for security and compatibility reasons. # Configure the appropriate CLASSPATH. if test "${INSTANCE_ROOT}" =
"" # Capture the current working directory so that we can change to it later. # Then capture the location of this script and the Directory Server instance # root so that we can use them to create appropriate paths. if test "${SCRIPT_UTIL_CMD}" =
"set-full-environment-and-test-java" elif test "${SCRIPT_UTIL_CMD}" =
"set-full-environment" elif test "${SCRIPT_UTIL_CMD}" =
"set-java-home-and-args" elif test "${SCRIPT_UTIL_CMD}" =
"set-environment-vars" elif test "${SCRIPT_UTIL_CMD}" =
"set-classpath" elif test "${SCRIPT_UTIL_CMD}" =
"test-java"