1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
#!/bin/sh
#
# File: jswat
# Purpose: jswat application startup script
# Author: crafterm@debian.org
# Date: 4 October 2001
# Usage: jswat [-h] [-sp sourcepath] [-cp classpath] [jvm arg] [class]
# -h or --help : Display this help message
# -sp or --sourcepath : Set source path for locating source files
# -cp or --classpath : Specify debugged JVM classpath
# jvm arg : Arguments to pass to jvm being debugged
# class : Class to debugged
#
# Note, all parameters listed above can also be specified via jswat's
# 'Debug->Start' VM dialog.
#
#
# This script is licensed under the same terms as jswat itself
#
# Declare local functions
showhelp()
{
head -16 $0 # display help
exit 1
}
# Process command line arguments
for args in $*
do
case $args in
# Display help if the user asks for it
"-h"|"--help") showhelp ;;
# Specify source path
"-sp"|"--sourcepath") SOURCES=$2; shift 2 ;;
# Specify target JVM classpath
"-cp"|"--classpath") CP=$2; shift 2 ;;
esac
done
# Setup classpath
CLASSPATH=$CLASSPATH:$CP:/usr/share/java/jswat-@JSWAT_VERSION@.jar:/usr/share/java/jswat-parser-@JSWAT_VERSION@.jar
if [ "$JAVA_HOME" != "" ] ; then
if [ -f $JAVA_HOME/lib/tools.jar ] ; then
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar
fi
fi
export CLASSPATH
# Execute JSWAT
exec /usr/bin/java -Djava.source.path="$SOURCES" com.bluemarsh.jswat.Main $@
|