blob: 872c0cc5ecd76eb71e0fbe6d058c67c4b8edfcb2 (
plain)
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
|
#!/bin/sh
# jswat Launch Script
# Author: Dylan Carlson
# May 2003
# $Header: /var/cvsroot/gentoo-x86/dev-java/jswat/files/jswat2,v 1.2 2004/07/18 02:53:05 dragonheart Exp $
JSWAT_VER="2.17"
JAVA_HOME=`/usr/bin/java-config --jdk-home`
if [ -z "${JAVA_HOME}" ] ; then
JAVA_HOME=`/usr/bin/java-config --jre-home`
fi
CLASSPATH="${JAVA_HOME}/lib/tools.jar:`/usr/bin/java-config --classpath=jswat-${JSWAT_VER}`:${CLASSPATH}"
if [ ! -f ${JAVA_HOME}/bin/java ] ; then
echo " "
echo "I tried using the following Java Runtime:"
echo "${JAVA_HOME}/bin/java"
echo " "
echo "Java Runtime missing. Please run java-config(1) and ensure"
echo "your environment is configured properly."
exit 1
else
echo " "
echo "Using Java Runtime:"
echo "${JAVA_HOME}/bin/java"
echo " "
echo "Using CLASSPATH:"
echo "${CLASSPATH}"
echo " "
fi
# Make sure we're using 1.4 JDK
if [ -z `echo ${JAVA_HOME} | grep "1.4"` ] ; then
echo "!!! JDK 1.4 is required for this version of "
echo "!!! jswat (${JSWAT_VER}). "
echo "!!! "
echo "!!! Please run java-config(1) and configure "
echo "!!! your system to use a 1.4 or later JDK. "
echo " "
exit 1
fi
${JAVA_HOME}/bin/java com.bluemarsh.jswat.Main $@
|