launcher.sh-template revision 3437:4344c9ad3c9d
11590Srgrimes#!/bin/sh
21590Srgrimes
31590Srgrimes#
41590Srgrimes# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
51590Srgrimes# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
61590Srgrimes#
71590Srgrimes# This code is free software; you can redistribute it and/or modify it
81590Srgrimes# under the terms of the GNU General Public License version 2 only, as
91590Srgrimes# published by the Free Software Foundation.  Oracle designates this
101590Srgrimes# particular file as subject to the "Classpath" exception as provided
111590Srgrimes# by Oracle in the LICENSE file that accompanied this code.
121590Srgrimes#
131590Srgrimes# This code is distributed in the hope that it will be useful, but WITHOUT
141590Srgrimes# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
151590Srgrimes# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
161590Srgrimes# version 2 for more details (a copy is included in the LICENSE file that
171590Srgrimes# accompanied this code).
181590Srgrimes#
191590Srgrimes# You should have received a copy of the GNU General Public License version
201590Srgrimes# 2 along with this work; if not, write to the Free Software Foundation,
211590Srgrimes# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
221590Srgrimes#
231590Srgrimes# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
241590Srgrimes# or visit www.oracle.com if you need additional information or have any
251590Srgrimes# questions.
261590Srgrimes#
271590Srgrimes
281590Srgrimes# tools currently assumes that assertions are enabled in the launcher
291590Srgrimesea=-ea:com.sun.tools...
301590Srgrimes
311590Srgrimes# Any parameters starting with -J are passed to the JVM.
321590Srgrimes# All other parameters become parameters of #PROGRAM#.
331590Srgrimes
341590Srgrimes# Separate out -J* options for the JVM
351590Srgrimes# Unset IFS and use newline as arg separator to preserve spaces in args
36103905SacheDUALCASE=1  # for MKS: make case statement case-sensitive (6709498)
37103905SachesaveIFS="$IFS"
381590Srgrimesnl='
391590Srgrimes'
401590Srgrimesfor i in "$@" ; do
411590Srgrimes   IFS=
421590Srgrimes   case $i in
431590Srgrimes   -J* )       javaOpts=$javaOpts$nl`echo $i | sed -e 's/^-J//'` ;;
441590Srgrimes   *   )       toolOpts=$toolOpts$nl$i ;;
451590Srgrimes   esac
4618164Sjoerg   IFS="$saveIFS"
471590Srgrimesdone
481590Srgrimesunset DUALCASE
491590Srgrimes
501590SrgrimesIFS=$nl
511590Srgrimes"#TARGET_JAVA#" #XPATCH# ${ea} ${javaOpts} #PROGRAM# ${toolOpts}
521590Srgrimes