Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Dec 1999 18:32:25 +1100
From:      "Lachlan O'Dea" <lodea@vet.com.au>
To:        freebsd-java@freebsd.org
Subject:   HOWTO: Blackdown JDK 1.2.2 RC3 on 3.x
Message-ID:  <19991207183225.B12671@vet.com.au>

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

--6sX45UoQRIJXqkqR
Content-Type: text/plain; charset=us-ascii

I've managed to get Blackdown's Linux JDK 1.2.2 RC3 to run on my
3.3-STABLE machine. I thought some folks might be interested, so here's
the steps I performed.

Note that this involves the use of glibc 2.1.2. From what I can gather,
glibc versions > 2.0 are only "officially" supported in -current. So
trying this under -stable may cause you all kinds of problems. Use at
your own risk, etc. All I know is that it does run on my box (at least for
the few apps I've tried).

If I remember correctly, here's what I did:

1. Downloaded jdk-1.2.2-RC3-linux-i386.tar.bz2 from Blackdown
(www.blackdown.org). Note that RC2 does not work under FreeBSD (well it
didn't for me).

2. Installed the misc/rpm port.

3. Installed the emulators/linux_base-6.0 port. This is the "unofficial"
bit, this port is designed for -current (I believe). This port was made
by Marcel Moolenaar and is available from
http://www.freebsd.org/~marcel/. I notice he has a linux_base-6.1 port
there now as well, which would probably work too.

4. The Blackdown README says that it needs glibc 2.1.2. Since
linux_base-6.0 had a slightly earlier version, I downloaded the RPM
<ftp://ftp.redhat.com/redhat/redhat-6.1/i386/RedHat/RPMS/glibc-2.1.2-11.i386.rpm>;

Then I did (approximately)

# rpm --root /compat/linux -U glibc-2.1.2-11.i386.rpm

The linux_base-6.1 port probably includes glibc-2.1.2, so you can skip
this step in that case.

5. % setenv JAVA_HOME /path/to/blackdown/jdk

6. Applied the attached patch to $JAVA_HOME/bin/.java_wrapper and
$JAVA_HOME/jre/bin/.java_wrapper. Note that this patch makes green
threads the default, since native threads don't work.

7. Ran /usr/bin/linux (obviously you only need this if the linux kernel
module isn't loaded)

8. % java ACoolJavaApp

So far I've only tested the demo apps SimpleExample and SwingSet and
they both worked fine. You get a bunch of errors about dingbats fonts
that weren't found, but it does that on my Redhat box too.

The good news is that Swing is noticably faster that in the last
Blackdown JDK I'd used (the JDK 1.2 pre-release 2). The SwingSet
"Internal Frame" and "ScrollPane" demos are now actually usable on my
Pentium 133.

-- 
Lachlan O'Dea <mailto:lodea@vet.com.au>   Computer Associates Pty Ltd
Webmaster                                   Vet - Anti-Virus Software
http://www.vet.com.au/

"There is not a truth existing which I fear... or would
wish unknown to the whole world." - Thomas Jefferson


--6sX45UoQRIJXqkqR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="javawrapper2.diff"

--- .java_wrapper.orig	Tue Dec  7 18:20:15 1999
+++ .java_wrapper	Tue Dec  7 18:20:02 1999
@@ -17,6 +17,8 @@
 PRG=$0
 progname=`basename $0`
 
+export PATH=/compat/linux/usr/bin:$PATH
+
 case "`uname -m`" in
     i[3-6]86 | ia32)
         proc=i386
@@ -32,8 +34,8 @@
 # Resolve symlinks. See 4152645.
 while [ -L "$PRG" ]; do
     ls=`/bin/ls -ld "$PRG"`
-    link=`/usr/bin/expr "$ls" : '.*-> \(.*\)$'`
-    if /usr/bin/expr "$link" : '/' > /dev/null; then
+    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"
@@ -65,7 +67,7 @@
 # Select vm type (if classic vm, also select thread type).
 unset vmtype
 unset ttype
-DEFAULT_THREADS_FLAG=native
+DEFAULT_THREADS_FLAG=green
 if [ "x$1" = "x-hotspot" ]; then
     vmtype=hotspot
     ttype=native_threads

--6sX45UoQRIJXqkqR--


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?19991207183225.B12671>