langtools/src/share/bin/launcher.sh-template
changeset 3149 0cd06d598d6f
parent 10 06bc494ca11e
child 3154 9774a1914341
equal deleted inserted replaced
3148:7506c0293ff1 3149:0cd06d598d6f
     1 #!/bin/sh
     1 #!/bin/sh
     2 
     2 
     3 #
     3 #
     4 # Copyright 2006-2007 Sun Microsystems, Inc.  All Rights Reserved.
     4 # Copyright 2006-2009 Sun Microsystems, Inc.  All Rights Reserved.
     5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     6 #
     6 #
     7 # This code is free software; you can redistribute it and/or modify it
     7 # This code is free software; you can redistribute it and/or modify it
     8 # under the terms of the GNU General Public License version 2 only, as
     8 # under the terms of the GNU General Public License version 2 only, as
     9 # published by the Free Software Foundation.  Sun designates this
     9 # published by the Free Software Foundation.  Sun designates this
    42        grep "Class-Path:" |
    42        grep "Class-Path:" |
    43        sed -e 's|Class-Path: *||' -e 's|\([a-z]*\.jar\) *|'"$mylib"'/\1:|g'`
    43        sed -e 's|Class-Path: *||' -e 's|\([a-z]*\.jar\) *|'"$mylib"'/\1:|g'`
    44    bcp="$mylib/#PROGRAM#.jar":$cp 
    44    bcp="$mylib/#PROGRAM#.jar":$cp 
    45 fi
    45 fi
    46 
    46 
    47 # javac currently assumes that assertions are enabled in the launcher
    47 # tools currently assumes that assertions are enabled in the launcher
    48 ea=-ea:com.sun.tools
    48 ea=-ea:com.sun.tools
    49 
    49 
    50 "#TARGET_JAVA#" ${bcp:+-Xbootclasspath/p:"$bcp"} ${ea} -jar "${mydir}"/../lib/#PROGRAM#.jar "$@"
    50 # Any parameters starting with -J are passed to the JVM.
       
    51 # All other parameters become parameters of #PROGRAM#.
       
    52 
       
    53 # Separate out -J* options for the JVM
       
    54 # Note jdk as possible default to run jtreg
       
    55 # Unset IFS and use newline as arg separator to preserve spaces in args
       
    56 DUALCASE=1  # for MKS: make case statement case-sensitive (6709498)
       
    57 saveIFS="$IFS"
       
    58 nl='
       
    59 '
       
    60 for i in "$@" ; do
       
    61    IFS=
       
    62    case $i in
       
    63    -J* )       javaOpts=$javaOpts$nl`echo $i | sed -e 's/^-J//'` ;;
       
    64    *   )       toolOpts=$toolOpts$nl$i ;;
       
    65    esac
       
    66    IFS="$saveIFS"
       
    67 done
       
    68 unset DUALCASE
       
    69 
       
    70 eval "#TARGET_JAVA#" "${bcp:+-Xbootclasspath/p:"$bcp"}" ${ea} ${javaOpts} -jar "${mydir}"/../lib/#PROGRAM#.jar ${toolOpts}