From owner-freebsd-java Wed Dec 8 10:43:21 1999 Delivered-To: freebsd-java@freebsd.org Received: from mta1.mail.mel.aone.net.au (stl0srv0.syd.ops.au.ozemail.net [203.2.192.65]) by hub.freebsd.org (Postfix) with ESMTP id B0696151D9 for ; Wed, 8 Dec 1999 10:22:00 -0800 (PST) (envelope-from lodea@vet.com.au) Received: from rivendell.mel.vet.com.au ([203.103.154.61]) by mta1.mail.mel.aone.net.au (InterMail vM.4.01.02.00 201-229-116) with ESMTP id <19991207073226.BJPF28866.mta1.mail.mel.aone.net.au@rivendell.mel.vet.com.au> for ; Tue, 7 Dec 1999 18:32:26 +1100 Received: (from lodea@localhost) by rivendell.mel.vet.com.au (8.9.3/8.9.3) id SAA22752 for freebsd-java@freebsd.org; Tue, 7 Dec 1999 18:32:25 +1100 (EST) Date: Tue, 7 Dec 1999 18:32:25 +1100 From: "Lachlan O'Dea" To: freebsd-java@freebsd.org Subject: HOWTO: Blackdown JDK 1.2.2 RC3 on 3.x Message-ID: <19991207183225.B12671@vet.com.au> Mail-Followup-To: freebsd-java@freebsd.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="6sX45UoQRIJXqkqR" User-Agent: Mutt/1.1.1i X-Operating-System: FreeBSD 3.3-STABLE i386 Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --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 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 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