From owner-freebsd-java Wed Sep 13 13: 0:11 2000 Delivered-To: freebsd-java@freebsd.org Received: from ebola.biohz.net (ebola.biohz.net [206.80.1.35]) by hub.freebsd.org (Postfix) with ESMTP id 0D47E37B423 for ; Wed, 13 Sep 2000 13:00:00 -0700 (PDT) Received: from flu (localhost [127.0.0.1]) by ebola.biohz.net (Postfix) with SMTP id 4D5C13A3C2; Wed, 13 Sep 2000 12:59:47 -0700 (PDT) Message-ID: <007101c01dbd$2f982b20$0302010a@biohz.net> From: "Renaud Waldura" To: "Edward Wolpert" , Cc: References: <200009131848.MAA24090@cthulhu.methodsystems.com> Subject: Re: Using the Linux JDK/JRE v1.3 with FreeBSD 4.x Date: Wed, 13 Sep 2000 12:59:43 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Same here. Runs fine under the Linux emulation, although I have no performance comments. I was given this modified .java_wrapper script by Carlos Valiente carlos@difernet.com ; it uses the Linux "expr". He also mentionned that the "classic" VM should be used by editing $JAVA_HOME/jre/lib/jvm.cfg. I implemented his suggestions and it works for me. What problems are you having? --Renaud -----8<--------8<------- #!/bin/sh # # @(#)java_wrapper_linux.sh 1.8 00/05/19 # # Copyright 1994-1998 by Sun Microsystems, Inc., # 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. # All rights reserved. # # This software is the confidential and proprietary information # of Sun Microsystems, Inc. ("Confidential Information"). You # shall not disclose such Confidential Information and shall use # it only in accordance with the terms of the license agreement # you entered into with Sun. # PRG=$0 progname=`basename $0` case "`uname -m`" in i[3-6]86 | ia32 | ia64) proc=i386 ;; sparc*) proc=sparc ;; *) proc="`uname -m`" ;; esac # Resolve symlinks. See 4152645. while [ -L "$PRG" ]; do ls=`/bin/ls -ld "$PRG"` link=`/compat/linux/usr/bin/expr "$ls" : '.*-> \(.*\)$'` if /compat/linux/usr/bin/expr "$link" : '/' > /dev/null; then PRG="$link" else PRG="`/usr/bin/dirname $PRG`/$link" fi done APPHOME=`dirname "$PRG"`/.. JREHOME=$APPHOME/jre # Where is JRE? unset jre if [ -f "${JREHOME}/lib/${proc}/libjava.so" ]; then jre="${JREHOME}" fi if [ -f "${APPHOME}/lib/${proc}/libjava.so" ]; then jre="${APPHOME}" fi if [ "x${jre}" = "x" ]; then echo "Error: can't find libjava.so." exit 1 fi # Get the canonicalized absolute pathnames jre="`$jre/bin/realpath $jre`" APPHOME="`${jre}/bin/realpath $APPHOME`" JREHOME="`${jre}/bin/realpath $JREHOME`" export APPHOME JREHOME # Select vm type ttype=native_threads if grep "^$1\$" ${jre}/lib/jvm.cfg > /dev/null; then # User specified some VM type known to jvm.cfg. vmtype=`echo $1 | /usr/bin/cut -c 2-` else # User didn't specify a VM type, see if default is classic. default=`grep -v '^#' "${jre}/lib/jvm.cfg" | /usr/bin/head -1` vmtype=`echo ${default} | /usr/bin/cut -c 2-` fi if [ "${vmtype}" = "classic" ]; then ttype=green_threads LD_BIND_NOW=yes export LD_BIND_NOW _JVM_THREADS_TYPE=green_threads export _JVM_THREADS_TYPE fi # If jre is in a jre subdir, include parent dir libraries in lib path. This # needs to be cleaned up because -Xrun libraries are the ones that need it. if [ "${jre}" = "$JREHOME" ]; then JAVA_LIBRARY_PATH=":${jre}/../lib/${proc}" fi # Set LD_LIBRARY_PATH for libjvm.so (necessitated by ld.so bugid 4176579) JAVA_LIBRARY_PATH="${jre}/lib/${proc}/${vmtype}$JAVA_LIBRARY_PATH" # Set LD_LIBRARY_PATH to find libawt.so etc. JAVA_LIBRARY_PATH="${jre}/lib/${proc}:${jre}/lib/${proc}/${ttype}/:${JAVA_LI BRARY_PATH}" LD_LIBRARY_PATH="${JAVA_LIBRARY_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" export LD_LIBRARY_PATH prog="$APPHOME/bin/${proc}/${ttype}/${progname}" # Run. if [ -x "$prog" ] then # Calling: exec $DEBUG_PROG "$prog" "$@" exec $DEBUG_PROG "$prog" "$@" else echo >&2 "$progname was not found in ${prog}" exit 1 fi -----8<--------8<------- ----- Original Message ----- From: Edward Wolpert To: ; Sent: Wednesday, September 13, 2000 11:48 AM Subject: Re: Using the Linux JDK/JRE v1.3 with FreeBSD 4.x > >Has anyone gotten the Linux version of Sun's Java JDK/JRE v1.3 to work > >on FreeBSD v4.x??? > > Yes. It's a bit slow, but I use it to do compiles of jBoss since jBoss > requires 1.3.x. > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-java" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message