#!/bin/sh # Copyright © 2001 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. if [ ! "${J2SE14}" ]; then export J2SE14=${JAVA_HOME} fi if [ ! "${JSR14DISTR}" ]; then LINKPATH=$(readlink $0) if [ "${LINKPATH}" ]; then PROGDIR=$(dirname ${LINKPATH}) else PROGDIR=$(dirname $0) fi case "${PROGDIR}" in [^/]*) export JSR14DISTR="$(pwd)/${PROGDIR}/.." ;; *) export JSR14DISTR="${PROGDIR}/.." ;; esac fi if [ ! -x ${J2SE14}/bin/javac ]; then echo '${J2SE14} does not point to a working J2SE 1.4.2 installation.' exit 1 fi RUNTIME_JAR="" if [ -r "${J2SE14}/../../CurrentJDK/Classes/classes.jar" ]; then RUNTIME_JAR="${J2SE14}/../../CurrentJDK/Classes/classes.jar" echo "Detected a MacOSX Apple java installation" fi if [ -r "${J2SE14}/jre/lib/core.jar" ]; then RUNTIME_JAR="${J2SE14}/jre/lib/core.jar" echo "Detected a Windows / Linux IBM java installation" fi if [ -r "${J2SE14}/jre/lib/rt.jar" ]; then RUNTIME_JAR="${J2SE14}/jre/lib/rt.jar" echo "Detected a Windows / Linux SUN java installation" fi if [ ! "${RUNTIME_JAR}" ]; then echo '${J2SE14} does not point to a working J2SE 1.4.2 installation.' exit 1 fi if [ ! -r ${JSR14DISTR}/gjc-rt.jar -o ! -r ${JSR14DISTR}/collect.jar ]; then echo '${JSR14DISTR} does not point to a JSR14 distribution.' exit 1 fi if [ ! "$*" ]; then # if no arguments, print usage exec ${J2SE14}/bin/javac -J-Xbootclasspath/p:${JSR14DISTR}/gjc-rt.jar fi PARAMS=${@#+E} exec ${J2SE14}/bin/javac -J-Xbootclasspath/p:${JSR14DISTR}/gjc-rt.jar -bootclasspath ${JSR14DISTR}/collect.jar:${RUNTIME_JAR} ${PARAMS}