#!/bin/sh

# When the stop button is click the java compiler should be killed.
# Unfortunately, the destroy() method in the Process class, sends a
# SIGTERM which tells the process to clean up its temp files before
# terminating(ie, finish the compile).  

if [ -x ${_SS_JDK_HOME}/bin/`/bin/uname -p`/javac ]
then 
  # Translate SIGTERM into SIGKILL
  exec ${_SS_JDK_HOME}/bin/java -ms8m sun.tools.javac.Main $*
else 
  echo "[ JWS error: javac not found ]"
  echo "[ JWS error: expected to find it at ${_SS_JDK_BIN}/bin/`/bin/uname -p`/javac ]"
fi 
