Fri, 05 Dec 2008 09:52:51 -0800
Merge
duke@1 | 1 | #!/bin/sh |
duke@1 | 2 | |
duke@1 | 3 | # |
duke@1 | 4 | # Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved. |
duke@1 | 5 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@1 | 6 | # |
duke@1 | 7 | # This code is free software; you can redistribute it and/or modify it |
duke@1 | 8 | # under the terms of the GNU General Public License version 2 only, as |
duke@1 | 9 | # published by the Free Software Foundation. Sun designates this |
duke@1 | 10 | # particular file as subject to the "Classpath" exception as provided |
duke@1 | 11 | # by Sun in the LICENSE file that accompanied this code. |
duke@1 | 12 | # |
duke@1 | 13 | # This code is distributed in the hope that it will be useful, but WITHOUT |
duke@1 | 14 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@1 | 15 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@1 | 16 | # version 2 for more details (a copy is included in the LICENSE file that |
duke@1 | 17 | # accompanied this code). |
duke@1 | 18 | # |
duke@1 | 19 | # You should have received a copy of the GNU General Public License version |
duke@1 | 20 | # 2 along with this work; if not, write to the Free Software Foundation, |
duke@1 | 21 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@1 | 22 | # |
duke@1 | 23 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
duke@1 | 24 | # CA 95054 USA or visit www.sun.com if you need additional information or |
duke@1 | 25 | # have any questions. |
duke@1 | 26 | # |
duke@1 | 27 | |
duke@1 | 28 | mydir="`dirname $0`" |
duke@1 | 29 | mylib="`dirname $mydir`"/lib |
duke@1 | 30 | |
duke@1 | 31 | # By default, put the jar file and its dependencies on the bootclasspath. |
duke@1 | 32 | # This is always required on a Mac, because the system langtools classes |
duke@1 | 33 | # are always on the main class path; in addition, it may be required on |
duke@1 | 34 | # standard versions of JDK (i.e. using rt.jar and tools.jar) because some |
duke@1 | 35 | # langtools interfaces are in rt.jar. |
duke@1 | 36 | # Assume that the jar file being invoked lists all the necessary langtools |
duke@1 | 37 | # jar files in its Class-Path manifest entry, so there is no need to search |
duke@1 | 38 | # dependent jar files for additional dependencies. |
duke@1 | 39 | |
duke@1 | 40 | if [ "$LANGTOOLS_USE_BOOTCLASSPATH" != "no" ]; then |
duke@1 | 41 | cp=`unzip -c $mylib/#PROGRAM#.jar META-INF/MANIFEST.MF | |
duke@1 | 42 | grep "Class-Path:" | |
duke@1 | 43 | sed -e 's|Class-Path: *||' -e 's|\([a-z]*\.jar\) *|'"$mylib"'/\1:|g'` |
duke@1 | 44 | bcp="$mylib/#PROGRAM#.jar":$cp |
duke@1 | 45 | fi |
duke@1 | 46 | |
duke@1 | 47 | # javac currently assumes that assertions are enabled in the launcher |
duke@1 | 48 | ea=-ea:com.sun.tools |
duke@1 | 49 | |
duke@1 | 50 | "#TARGET_JAVA#" ${bcp:+-Xbootclasspath/p:"$bcp"} ${ea} -jar "${mydir}"/../lib/#PROGRAM#.jar "$@" |