#! /bin/sh
#
# $Id$ Copyright (c) 2000-2018 EMC Corporation
#

#
# Copyright (c) 2000-2018 EMC Corporation.
#
# All rights reserved.  This is an UNPUBLISHED work, and
# comprises proprietary and confidential information of EMC.
# Unauthorized use, disclosure, and distribution are strictly
# prohibited.  Use, duplication, or disclosure of the software
# and documentation by the U.S. Government is subject to
# restrictions set forth in a license agreement between the
# Government and EMC or other written agreement specifying
# the Government's rights to use the software and any applicable
# FAR provisions, such as FAR 52.227-19.
#

# Java Runtime Environment 8 or higher is required to run this script.
# Uncomment the line below and set JAVA_HOME to a valid JRE location.

# For example: JAVA_HOME=/usr/java/jre8

# gstconfig bEgIn DO NOT ALTER THIS LINE
# gstconfig  eNd  DO NOT ALTER THIS LINE

CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/javaws.jar:$JAVA_HOME/javaws/javaws.jar

if [ -n "${JAVA_HOME}" ]; then
    $JAVA_HOME/bin/java -version
    if [ $? -eq 0 ]; then
	$JAVA_HOME/bin/java -showversion -Djava.locale.providers=COMPAT -XX:+IgnoreUnrecognizedVMOptions --add-modules=java.xml.bind -Djava.awt.headless=true -Xms64M -Xmx1024M -cp $CLASSPATH COM.legato.gems.reports.CommandLineReport -s $HOST -p $PORTNUM -b $DBPORTNUM -q $BRAND "$@"
	exit 0
    else
	echo "% Your current JAVA_HOME is ${JAVA_HOME}"
    fi

else
    echo "% JAVA_HOME is not set."
fi

echo "% Java Runtime Environment 8  or higher is required to run this script."
echo "% Please read comments at the top of gstclreport file to set"
echo "% JAVA_HOME to a valid JRE location."

exit 1
