jdk/test/java/lang/instrument/MakeJAR3.sh
changeset 15254 3997a6f357cb
parent 5506 202f599c92aa
--- a/jdk/test/java/lang/instrument/MakeJAR3.sh	Fri Jan 11 12:27:57 2013 +0000
+++ b/jdk/test/java/lang/instrument/MakeJAR3.sh	Fri Jan 11 20:19:55 2013 +0000
@@ -39,17 +39,23 @@
 fi
 echo "TESTJAVA=${TESTJAVA}"
 
+if [ "${COMPILEJAVA}" = "" ]
+then
+  COMPILEJAVA="${TESTJAVA}"
+fi
+echo "COMPILEJAVA=${COMPILEJAVA}"
+
 if [ "${TESTCLASSES}" = "" ]
 then
   echo "TESTCLASSES not set.  Test cannot execute.  Failed."
   exit 1
 fi
 
-JAVAC="${TESTJAVA}/bin/javac -g"
-JAR="${TESTJAVA}/bin/jar"
+JAVAC="${COMPILEJAVA}/bin/javac -g"
+JAR="${COMPILEJAVA}/bin/jar"
 
 cp ${TESTSRC}/${AGENT}.java .
-${JAVAC} ${AGENT}.java
+${JAVAC} ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} ${AGENT}.java
 
 echo "Manifest-Version: 1.0"    >  ${AGENT}.mf
 echo Premain-Class: ${AGENT} >> ${AGENT}.mf
@@ -60,4 +66,4 @@
 done
 
 
-${JAR} cvfm ${AGENT}.jar ${AGENT}.mf ${AGENT}*.class
+${JAR} ${TESTTOOLVMOPTS} cvfm ${AGENT}.jar ${AGENT}.mf ${AGENT}*.class