Date: Sat, 15 Mar 2003 00:30:54 +0900 (JST) From: Munehiro Matsuda <haro@h4.dion.ne.jp> To: Greg Lewis <glewis@eyesbeyond.com> Cc: freebsd-java@FreeBSD.ORG Subject: [CFR] jdk1.3.1 java_wrapper script update patch Message-ID: <20030315.003054.74755042.haro@h4.dion.ne.jp>
next in thread | raw e-mail | index | archive | help
----Next_Part(Sat_Mar_15_00:30:54_2003_586)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello Greg and all, I've created a patch which updates java_wrapper shell-script for jdk-1.3.1, that addresses the issues with classic/hotspot VM mixed environment. Main changes are: 1. Properly handle -client/-server options. 2. Recognise -classic/-green/-native/-client/-server/-hotspot arguments, and pass appropriate argument to the executing command. 3. Honer THREADS_FLAG environment variable more. With these changes, following suceeds, even with hotspot installed: java -version java -classic -version java -green -version java -native -version java -client -version java -server -version java -hotspot -version I'd appriciate any feed back with it. Thank you, Haro =------------------------------------------------------------------------------ _ _ Munehiro (haro) Matsuda -|- /_\ |_|_| Business Incubation Dept., Kubota Corp. /|\ |_| |_|_| 1-3 Nihonbashi-Muromachi 3-Chome Chuo-ku Tokyo 103-8310, Japan Tel: +81-3-3245-3318 Fax: +81-3-3245-3315 Email: haro@kgt.co.jp ----Next_Part(Sat_Mar_15_00:30:54_2003_586)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-java_wrapper_bsd.sh" --- ../src/solaris/bin/java_wrapper_bsd.sh.org Fri Mar 14 18:42:05 2003 +++ ../src/solaris/bin/java_wrapper_bsd.sh Fri Mar 14 19:03:36 2003 @@ -71,37 +71,60 @@ # Select vm type (if classic vm, also select thread type). unset vmtype unset ttype +unset vmopt DEFAULT_THREADS_FLAG=green -if [ "x$1" = "x-hotspot" ]; then - vmtype=hotspot +if [ "x$1" = "x-client" ]; then + vmtype=client ttype=native_threads + vmopt=-$vmtype shift 1 else if [ "x$1" = "x-classic" ]; then vmtype=classic - ttype=${DEFAULT_THREADS_FLAG}_threads + if [ ${THREADS_FLAG:-${DEFAULT_THREADS_FLAG}} = native ]; then + ttype=native_threads + else + ttype=green_threads + fi + vmopt=-$vmtype shift 1 else if [ "x$1" = "x-green" ]; then vmtype=classic ttype=green_threads + vmopt=-$vmtype shift 1 else if [ "x$1" = "x-native" ]; then vmtype=classic ttype=native_threads + vmopt=-$vmtype shift 1 else - if [ -d ${jre}/lib/${proc}/hotspot ]; then - vmtype=hotspot + if [ "x$1" = "x-server" ]; then + vmtype=server ttype=native_threads - else - vmtype=classic - if [ ${THREADS_FLAG:-${DEFAULT_THREADS_FLAG}} = native ] - then + vmopt=-$vmtype + shift 1 + else + if [ "x$1" = "x-hotspot" ]; then + vmtype=client ttype=native_threads - else - ttype=green_threads + vmopt=-$vmtype + shift 1 + else + if [ -d ${jre}/lib/${proc}/client ]; then + vmtype=client + ttype=native_threads + else + vmtype=classic + if [ ${THREADS_FLAG:-${DEFAULT_THREADS_FLAG}} = native ] + then + ttype=native_threads + else + ttype=green_threads + fi + fi fi fi fi @@ -141,7 +164,11 @@ # Run. if [ -x "$prog" ] then - exec $DEBUG_PROG "$prog" "$@" + if [ "x$DEBUG_PROG" = "x" ]; then + exec "$prog" $vmopt "$@" + else + exec $DEBUG_PROG "$prog" "$@" + fi else echo >&2 "$progname was not found in ${prog}" exit 1 ----Next_Part(Sat_Mar_15_00:30:54_2003_586)---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030315.003054.74755042.haro>