Ticket #14011: ecj

File ecj, 896 bytes (added by mvfranz@…, 17 years ago)

New script file to execute ecj as a java compiler

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