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