launcher.sh-template revision 307
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# Copyright 2006-2009 Sun Microsystems, Inc. All Rights Reserved.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# This code is free software; you can redistribute it and/or modify it
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# under the terms of the GNU General Public License version 2 only, as
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# published by the Free Software Foundation. Sun designates this
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# particular file as subject to the "Classpath" exception as provided
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# by Sun in the LICENSE file that accompanied this code.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# This code is distributed in the hope that it will be useful, but WITHOUT
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# version 2 for more details (a copy is included in the LICENSE file that
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# accompanied this code).
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# You should have received a copy of the GNU General Public License version
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# 2 along with this work; if not, write to the Free Software Foundation,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# CA 95054 USA or visit www.sun.com if you need additional information or
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# have any questions.
45cbbdf2c42e20970c2539ba6cc4b94c2599c3d7Kohei Tamura# By default, put the jar file and its dependencies on the bootclasspath.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# This is always required on a Mac, because the system langtools classes
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# are always on the main class path; in addition, it may be required on
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# standard versions of JDK (i.e. using rt.jar and tools.jar) because some
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# langtools interfaces are in rt.jar.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# Assume that the jar file being invoked lists all the necessary langtools
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# jar files in its Class-Path manifest entry, so there is no need to search
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# dependent jar files for additional dependencies.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosterif [ "$LANGTOOLS_USE_BOOTCLASSPATH" != "no" ]; then
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster cp=`unzip -c $mylib/#PROGRAM#.jar META-INF/MANIFEST.MF |
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster sed -e 's|Class-Path: *||' -e 's|\([a-z]*\.jar\) *|'"$mylib"'/\1:|g'`
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# tools currently assumes that assertions are enabled in the launcher
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# Any parameters starting with -J are passed to the JVM.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# All other parameters become parameters of #PROGRAM#.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# Separate out -J* options for the JVM
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# Note jdk as possible default to run jtreg
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# Unset IFS and use newline as arg separator to preserve spaces in args
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterDUALCASE=1 # for MKS: make case statement case-sensitive (6709498)
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster -J* ) javaOpts=$javaOpts$nl`echo $i | sed -e 's/^-J//'` ;;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostereval "#TARGET_JAVA#" "${bcp:+-Xbootclasspath/p:"$bcp"}" ${ea} ${javaOpts} -jar "${mydir}"/../lib/#PROGRAM#.jar ${toolOpts}