Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jul 2000 01:28:58 +0200
From:      Ernst de Haan <ernst@jollem.com>
To:        FreeBSD Java mailing list <freebsd-java@freebsd.org>
Subject:   Re: Sun Linux JDK 1.3.0b9 runz on FreeBSD 4.0-STABLE !
Message-ID:  <20000718012858.A13914@c187104187.telekabel.chello.nl>
In-Reply-To: <20000718011107.A13335@c187104187.telekabel.chello.nl>; from ernst@jollem.com on Tue, Jul 18, 2000 at 01:11:08AM %2B0200
References:  <20000718010217.A13154@c187104187.telekabel.chello.nl> <20000718011107.A13335@c187104187.telekabel.chello.nl>

next in thread | previous in thread | raw e-mail | index | archive | help

--KsGdsel6WgEHnImy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

After some discussion with Victor, here's the fix to make the
.java_wrapper file work without the error message: Change every
occurrence of a call to expr to /usr/compat/linux/usr/bin/expr. I've
attached the new file.

Ernst


Ernst de Haan wrote:
> Just one more hint: Change the jre/lib/jvm.cfg and put the last line on
> top. So you will get:
> 
>    -classic
>    -hotspot
>    -server
> 
> I _do_ get one warning, BTW, when running the Swing app:
> 
>    Warning: Cannot convert string "MetaCtrl<Key>Insert" to type VirtualBinding 
> 
> Ernst
> 
> 
> Ernst de Haan wrote:
> > Hi folkz,
> > 
> > I have the Sun JDK 1.3.0 for Linux, beta 9 running on my FreeBSD
> > 4.0-STABLE system. Runs pretty nicely too.
> > 
> > java -version reports:
> > 
> >    bash-2.04$ java -version
> >    expr: syntax error
> >    java version "1.3.0beta_refresh"
> >    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0beta_refresh-b09)
> >    Classic VM (build 1.3.0beta_refresh-b09, green threads, nojit)
> > 
> > The first line with the syntax error is a small problem with
> > .java_wrapper, but it seems harmless. I had to make some modifications
> > to the .java_wrapper script to make it work on my system. I've attached
> > the version I use.
> > 
> > I haven't done much testing yet, but I have tried a single Swing
> > application. I did notice some differences in fonts, but it all seems to
> > work pretty nice and fast :)
> > 
> > Wow, soon FreeBSD will be the platform with the greatest number of
> > working JDKs on it, once we get WINE to work so we can run the Windows
> > JDKs too, and write an AS/400 emulator, and... and... ;-)
> > 
> > Ernst
> > 
> > P.S.  Thanks go to Victor Salaman how pointed me in the right direction.
> >       He has been running the Sun JDK 1.3 for Linux for quite a while.

--KsGdsel6WgEHnImy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=".java_wrapper"

#!/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=`/usr/compat/linux/usr/bin/expr "$ls" : '.*-> \(.*\)$'`
    if /usr/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_LIBRARY_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

--KsGdsel6WgEHnImy--


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?20000718012858.A13914>