blob: 8f3c283c348063744f2a9c19f90862cea03f419d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/sh
JDKDIR="${JDKDIR:-${JAVA_HOME:-`setjdk.sh`}}"
AJ_HOME="${AJ_HOME:-`setajhome.sh`}"
PS="${PS:-;}"
ajrt=`pathtojava.sh "$AJ_HOME/lib/aspectjrt.jar"`
mkdir -p ../classes
for i in *.java; do
pack=`sed -n '/package/s|.*package *\([^ ][^ ]*\)[ ;].*|\1|p' "$i"`
[ -n "$pack" ] && pack="${pack}."
rm -rf classes/*
cname=$pack`basename $i .java`
echo ""
echo "########## $cname"
$AJ_HOME/bin/ajc -d ../classes -classpath "$ajrt" "$i"
&& $JDKDIR/bin/java -classpath "../classes${PS}$ajrt" $cname
done
rm -rf ../classes
|