1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/share/bin/launcher.sh-template Sat Dec 01 00:00:00 2007 +0000 1.3 @@ -0,0 +1,50 @@ 1.4 +#!/bin/sh 1.5 + 1.6 +# 1.7 +# Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved. 1.8 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.9 +# 1.10 +# This code is free software; you can redistribute it and/or modify it 1.11 +# under the terms of the GNU General Public License version 2 only, as 1.12 +# published by the Free Software Foundation. Sun designates this 1.13 +# particular file as subject to the "Classpath" exception as provided 1.14 +# by Sun in the LICENSE file that accompanied this code. 1.15 +# 1.16 +# This code is distributed in the hope that it will be useful, but WITHOUT 1.17 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.18 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.19 +# version 2 for more details (a copy is included in the LICENSE file that 1.20 +# accompanied this code). 1.21 +# 1.22 +# You should have received a copy of the GNU General Public License version 1.23 +# 2 along with this work; if not, write to the Free Software Foundation, 1.24 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.25 +# 1.26 +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 1.27 +# CA 95054 USA or visit www.sun.com if you need additional information or 1.28 +# have any questions. 1.29 +# 1.30 + 1.31 +mydir="`dirname $0`" 1.32 +mylib="`dirname $mydir`"/lib 1.33 + 1.34 +# By default, put the jar file and its dependencies on the bootclasspath. 1.35 +# This is always required on a Mac, because the system langtools classes 1.36 +# are always on the main class path; in addition, it may be required on 1.37 +# standard versions of JDK (i.e. using rt.jar and tools.jar) because some 1.38 +# langtools interfaces are in rt.jar. 1.39 +# Assume that the jar file being invoked lists all the necessary langtools 1.40 +# jar files in its Class-Path manifest entry, so there is no need to search 1.41 +# dependent jar files for additional dependencies. 1.42 + 1.43 +if [ "$LANGTOOLS_USE_BOOTCLASSPATH" != "no" ]; then 1.44 + cp=`unzip -c $mylib/#PROGRAM#.jar META-INF/MANIFEST.MF | 1.45 + grep "Class-Path:" | 1.46 + sed -e 's|Class-Path: *||' -e 's|\([a-z]*\.jar\) *|'"$mylib"'/\1:|g'` 1.47 + bcp="$mylib/#PROGRAM#.jar":$cp 1.48 +fi 1.49 + 1.50 +# javac currently assumes that assertions are enabled in the launcher 1.51 +ea=-ea:com.sun.tools 1.52 + 1.53 +"#TARGET_JAVA#" ${bcp:+-Xbootclasspath/p:"$bcp"} ${ea} -jar "${mydir}"/../lib/#PROGRAM#.jar "$@"