0N/A#!/bin/sh
0N/A
0N/A#
961N/A# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A#
0N/A# This code is free software; you can redistribute it and/or modify it
0N/A# under the terms of the GNU General Public License version 2 only, as
553N/A# published by the Free Software Foundation. Oracle designates this
0N/A# particular file as subject to the "Classpath" exception as provided
553N/A# by Oracle in the LICENSE file that accompanied this code.
0N/A#
0N/A# This code is distributed in the hope that it will be useful, but WITHOUT
0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A# version 2 for more details (a copy is included in the LICENSE file that
0N/A# accompanied this code).
0N/A#
0N/A# You should have received a copy of the GNU General Public License version
0N/A# 2 along with this work; if not, write to the Free Software Foundation,
0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A#
553N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
553N/A# or visit www.oracle.com if you need additional information or have any
553N/A# questions.
0N/A#
0N/A
0N/Amydir="`dirname $0`"
804N/Acase `uname -s` in
804N/A CYGWIN*)
804N/A mydir=`cygpath -m $mydir`
804N/A ;;
804N/Aesac
870N/Amylib="$mydir/../lib"
0N/A
0N/A# By default, put the jar file and its dependencies on the bootclasspath.
0N/A# This is always required on a Mac, because the system langtools classes
0N/A# are always on the main class path; in addition, it may be required on
0N/A# standard versions of JDK (i.e. using rt.jar and tools.jar) because some
0N/A# langtools interfaces are in rt.jar.
0N/A# Assume that the jar file being invoked lists all the necessary langtools
0N/A# jar files in its Class-Path manifest entry, so there is no need to search
0N/A# dependent jar files for additional dependencies.
0N/A
0N/Aif [ "$LANGTOOLS_USE_BOOTCLASSPATH" != "no" ]; then
470N/A cp=`unzip -c "$mylib/#PROGRAM#.jar" META-INF/MANIFEST.MF |
0N/A grep "Class-Path:" |
655N/A sed -e 's|Class-Path: *||' -e 's|\([a-z]*\.jar\) *|'"$mylib"'/\1#PS#|g'`
655N/A bcp="$mylib/#PROGRAM#.jar#PS#$cp"
0N/Afi
0N/A
307N/A# tools currently assumes that assertions are enabled in the launcher
369N/Aea=-ea:com.sun.tools...
0N/A
307N/A# Any parameters starting with -J are passed to the JVM.
307N/A# All other parameters become parameters of #PROGRAM#.
307N/A
307N/A# Separate out -J* options for the JVM
307N/A# Unset IFS and use newline as arg separator to preserve spaces in args
307N/ADUALCASE=1 # for MKS: make case statement case-sensitive (6709498)
307N/AsaveIFS="$IFS"
307N/Anl='
307N/A'
307N/Afor i in "$@" ; do
307N/A IFS=
307N/A case $i in
307N/A -J* ) javaOpts=$javaOpts$nl`echo $i | sed -e 's/^-J//'` ;;
307N/A * ) toolOpts=$toolOpts$nl$i ;;
307N/A esac
307N/A IFS="$saveIFS"
307N/Adone
307N/Aunset DUALCASE
307N/A
547N/AIFS=$nl
870N/A"#TARGET_JAVA#" "${bcp:+-Xbootclasspath/p:"$bcp"}" ${ea} ${javaOpts} -jar "${mylib}/#PROGRAM#.jar" ${toolOpts}