1 | #!/bin/bash |
---|
2 | # remove double bootclasspath entries: |
---|
3 | BOOTCLASSPATH="" |
---|
4 | BOOTCLASSPATH=$(find /opt/local/share/java -name "libgcj*.jar" -print | tr "\n" ":"):$(find /opt/local/share/java/ -name "glibj*.jar" -print | tr "\n" ":") |
---|
5 | OPTIONS="" |
---|
6 | while [ $# -gt 0 ] |
---|
7 | do |
---|
8 | if [ $1 = "-bootclasspath" ] |
---|
9 | then |
---|
10 | BOOTCLASSPATH=$2:$BOOTCLASSPATH |
---|
11 | shift |
---|
12 | shift |
---|
13 | continue |
---|
14 | fi |
---|
15 | OPTIONS="$OPTIONS $1" |
---|
16 | shift |
---|
17 | done |
---|
18 | GIJ_EXECUTABLE=$(ls /opt/local/bin/gij* | tail -n1) |
---|
19 | if [ -e /usr/bin/java ] |
---|
20 | then |
---|
21 | exec /usr/bin/java -jar /opt/local/share/java/eclipse-ecj.jar -bootclasspath $BOOTCLASSPATH $OPTIONS |
---|
22 | elif [ -e /usr/bin/cacao ] |
---|
23 | then |
---|
24 | exec /usr/bin/cacao -jar /opt/local/share/java/eclipse-ecj.jar -bootclasspath $BOOTCLASSPATH $OPTIONS |
---|
25 | elif [ -e ] |
---|
26 | then |
---|
27 | exec $GIJ_EXECUTABLE -jar /opt/local/share/java/eclipse-ecj.jar -bootclasspath $BOOTCLASSPATH $OPTIONS |
---|
28 | else |
---|
29 | echo "no java vm found :(" |
---|
30 | exit -1 |
---|
31 | fi |
---|