-
Notifications
You must be signed in to change notification settings - Fork 2
/
UMLAF
85 lines (68 loc) · 2.2 KB
/
UMLAF
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/sh
progname=$0
case $progname in
/*) ;;
./*) progname=$(pwd)/$(basename $progname) ;;
*) progname=$(pwd)/$progname ;;
esac
JAC_ROOT=$(dirname $progname)
#echo "JAC_ROOT=$JAC_ROOT"
JAVA=java
if [ -n "$JAVA_HOME" ]; then
JAVA="$JAVA_HOME/bin/java"
fi
JAR="$JAC_ROOT/jac.jar"
JVM_OPTS="$JVM_OPTS -Djava.security.policy=$JAC_ROOT/jac.policy -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel -Xms128m -Xmx256m"
GUIFLAG="-G"
ARGS=""
while [ $# -gt 0 ]; do
case $1 in
--swingwt)
JVM_OPTS="$JVM_OPTS -Xbootclasspath/p:$JAC_ROOT/lib/swingwt.jar:$JAC_ROOT/lib/swt.jar:$JAC_ROOT/lib/swt-pi.jar:$JAC_ROOT/lib/swt-mozilla.jar";;
--debug)
JVM_OPTS="$JVM_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4444 -Djava.compiler=NONE";;
--debug-suspend)
JVM_OPTS="$JVM_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=4444 -Djava.compiler=NONE";;
--jmp)
JVM_OPTS="$JVM_OPTS -Xrunjmp:noobjects,nomethods,nomonitors";;
--web)
GUIFLAG="-W";;
*)
ARGS="$ARGS $1";;
esac
shift
done
DESCRIPTOR=org/objectweb/jac/ide/ide.jac
CLASSPATH="."
if [ -d "$JAC_ROOT/src" ]; then
CLASSPATH="$CLASSPATH:$JAC_ROOT/src"
fi
if [ -d "$JAC_ROOT/classes" ]; then
CLASSPATH="$CLASSPATH:$JAC_ROOT/classes"
fi
#if [ -r "$JAR" ]; then
# CLASSPATH="$CLASSPATH:$JAR"
#fi
for jar in $JAC_ROOT/lib/*.jar; do
CLASSPATH="$CLASSPATH:$jar"
done
for jar in `find $JAC_ROOT/lib/opt -name "*.jar"`; do
CLASSPATH="$CLASSPATH:$jar"
done
JACPATH=""
if [ -r "$JAC_ROOT/umlaf.jar" ]; then
JACPATH="$JACPATH:$JAC_ROOT/umlaf.jar"
fi
tools="$JAVA_HOME/lib/tools.jar"
if [ -r "$tools" ]; then
JACPATH="$JACPATH:$tools"
fi
JACPATH="$JACPATH:$JAC_ROOT/lib/opt/jhotdraw.jar"
JAC_OPTS="-C $JACPATH -R $JAC_ROOT -w $GUIFLAG ide $ARGS $DESCRIPTOR"
if [ -r $JAR ]; then
exec $JAVA $JVM_OPTS -jar $JAR $JAC_OPTS
else
exec $JAVA $JVM_OPTS -classpath $CLASSPATH org.objectweb.jac.core.Jac $JAC_OPTS
fi
#exec $JAVA $JVM_OPTS -jar $JAR -R $JAC_ROOT -C $JAC_ROOT/umlaf.jar -w -G ide $ARGS $DESCRIPTOR
#kaffe -classpath $CLASSPATH:/usr/local/lib/j2sdk1.4.2/jre/lib/rt.jar org.objectweb.jac.core.Jac -R $JAC_ROOT -w -W ide $ARGS $DESCRIPTOR