[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
jdk117 using Linux emulation -- almost there!
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: jdk117 using Linux emulation -- almost there!
- From: Kenneth R Westerback <krw_(_at_)_tcn_(_dot_)_net>
- Date: Tue, 24 Nov 1998 20:00:23 -0500
- Mail-followup-to: misc_(_at_)_openbsd_(_dot_)_org
Having gotten past the initial setup of linux emulation (thanks guys!) I
proceeded to try and get jdk117_v1a working. After some head scratching
and cursing I figured out that jdk/bin/javac was a wrapper script, or
actually a link to the wrapper script .java_wrapper.
Two problems surfaced in my examination of said wrapper script. The
first few lines are
# @(#)java_wrapper.sh 1.33 97/10/16
# THIS SCRIPT AND JAVA WILL NOT RUN UNDER SUNOS4.X, AKA SOLARIS 1.X.
# Set up default variable values if not supplied by the user.
#PRG=`type -p $0` >/dev/null 2>&1
# If PRG is a symlink, trace it to the real home directory
while [ -L "$PRG" ]
newprg=`expr "\`/bin/ls -l "$PRG"\`" : ".*$PRG -> \(.*\)"`
expr "$newprg" : / >/dev/null || newprg="`dirname $PRG`/$newprg"
The first problem I found was the ARCH=`arch` command. Apparently
the Linux 'arch' returns only 'i386' whereas the OBSD 2.4 current I
am running has an 'arch' that returns 'OpenBSD.i386'. Since the jdk
installed several directories based on the Linux convention there
was some confusion in finding files. I replaced the line with
ARCH=`uname -m` (which a 'man arch' under Linux showed is what
Linux thinks 'arch' should be equivalent to) and it worked.
The second problem was the line 'PRG=`type -p $0`' which seemed
to put nothing into $PRG, causing more file finding confusion. After
reading the man page for sh and a little experimentation I replaced
this line with 'PRG=`which $0` >/dev/null 2>&1' and confusion
Now I can type ./javac in the jdk/bin directory and it actually
runs and says I really should give it a file to compile!
Is OBSD 'arch' deliberately or accidentally different?
Is 'type -p $0' supposed to work or is OBSD /bin/sh deliberately
Lastly, when I type ./javac I alway get two messages:
Usage: dirname dirname
use: javac ....
The first message seems to appear for every program I try in the jdk. I
don't see it being produces in the .java_wrapper so I am wondering if
it is an artifact of Linux emulation?
Visit your host, monkey.org