Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Oct 2003 10:30:50 -0500
From:      "M.D. DeWar" <mark@s-wit.net>
To:        <freebsd-java@FreeBSD.org>
Subject:   Newbie attempting to install java on FreeBSD - what a adventure.
Message-ID:  <001b01c39d68$796f9020$fb65a8c0@ocfl061>

next in thread | raw e-mail | index | archive | help
Hello,
I am trying to get java to install/run/ on a FreeBSD 4.8 box.
I ain't bitching or complaining. Maybe whinning. Okay am whinning.
Its a bitch to get this running. In reading I understand its mostly Sun's
refusal to be helpful. Or at least thats the impression I got in reading
pages/mail list postings on the net.

Hopefully someone outthere can help me get this thing going.
This is a normal freebsd install. no kernel options were passed other than
defaults.

This webpage http://www.freebsd.org/java/install.html  said to do this:
Installing FreeBSD's JDKT is typically straightforward:

cd /usr/ports/java/jdk
make
make install
make clean

Okay did that. I got a directory under /usr/local/linux-sun-jdk1.4.1

I had to fill out some license stuff I think. I have done so much can't
recall what I did at times or when or whatever. arghh.



When I try to run babylon chatserver I get this:

spiderman# ./java /temp/babylon-2.1_BETA/babylonServer
Exception in thread "main" java.lang.NoClassDefFoundError:
/temp/babylon-2/1_BET
A/babylonServer

Doing some more google searches I found kaffe-1.0.7. Downloaded it. Did its
thing. It fails to run.

More google searches and I found something called diablo.
http://www.freebsdfoundation.org/downloads/java.shtml

spiderman# cd diablo-jre1.3.1/
spiderman# ls
ControlPanel.html       bin                     plugin
README                  lib
Welcome.html            man
spiderman# cd bin
spiderman# ls
.java_wrapper   awt_robot       java            policytool      rmiregistry
ControlPanel    i386            keytool         rmid            tnameserv
spiderman# ./java /temp/babylon-2.1_BETA/babylonServer
Exception in thread "main" java.lang.NoClassDefFoundError:
/temp/babylon-2/1_BET
A/babylonServer

I added to profiles per  some docs.
JAVA_HOME=/usr/local/linux-sun-jdk1.4.1
export JAVA_HOME
CLASSPATH=.:${JAVA_HOME}jre/lib/rt.jar:/jre/lib/javaplugin.jar:/jre/lib/sinr
asig
export CLASSPATH

I put some patchsets into /usr/ports per some docs:
spiderman# cd /usr/ports/distfiles/
spiderman# ls
BUILD                           jdk14.patches
autoconf-2.53.tar.bz2           libtool-1.3.4.tar.gz
bsd-jdk14-patches-3.tar         m4-1.4.tar.gz
help2man-1.29.tar.gz            patch-pthread_attr_get_np.c
j2sdk-1_4_1_02-linux-i586.bin

More google searches brought me here:
http://www.eyesbeyond.com/freebsddom/java/jdk14.html
However I am not sure if I did the patches right. I don't think I did. The
docs were pretty vague for a newbie on running the patch on were I should
copy the patch to, were I should be to run it. And theres no contact addy
for any type of help so found it to be useless for me a dumbshit newbie.
In the build readme it says for experienced but hell out the hell is a
newbie to get experience with incomplete docs like this:
These instructions are intended for people who have experience manually

compiling the JDK or who are experienced with large complex package

compilation. They were originally provided by Alexey Zelkin.

You need one of the following setups:

FreeBSD 4.7-STABLE or 5.0-CURRENT (After 07-Jan-2003) or 5.0-RELEASE

(with included patch-libc_r-pthread_attr_get_np.c applied.)

-OR-

Stock FreeBSD 4.7-STABLE or 5.0-CURRENT (After 04-Feb-2003)

-OR-

NetBSD -current (with Scheduler Activations)

OpenMotif 2.1.30 or later.

GNU Make 3.79.1

Unzip 5.50 to unpack the source code.

You'll also need a working JDK 1.4.1 compiler to bootstrap the process.

Both FreeBSD and NetBSD include appropriate Linux JDKs which run under

emulation and can be used to bootstrap. On FreeBSD the preferred port

is java/linux-sun-jdk14, on NetBSD its lang/sun-jdk14.

Here is a typical set up for your build environment:

unsetenv LANG
<<<<< ???????

unsetenv JAVA_HOME
<<<WTF is all this mean in NEWBIE ENGLISH ???????????????????

unsetenv CLASSPATH
<<<<<<<< ??????????

setenv ALT_MOTIF_DIR /usr/X11R6                                    <
???????????????

setenv JAVAWS_OPTIONAL YES                                        <
???????????

setenv DEV_ONLY YES                                                       <
??????????????

In additional, with the recommended ports, one would use

setenv ALT_BOOTDIR /usr/local/linux-sun-jdk1.4.1
<??????????????????????????????

on FreeBSD, and

setenv ALT_BOOTDIR /usr/pkg/java/sun-1.4                                <
???????????????????????????????????

on NetBSD

This should be modified as appropriate for your particular system and shell.

After downloading the JDK 1.4.1 source from

http://www.sun.com/software/java2/download.html unpack it into

a location thats on a partition with around 2.5Gb of free disk space

or more.

unzip j2sdk-1_4_1-src-scsl.zip

Then simply apply the patches in jdk14.patches

patch -p0 < jdk14.patches               <were should I be to do this and do
it to what ??????????????

and you are ready to build:


On a list (don't recall which one ) it was suggested to add linuxprocfs to
my fstab . I did that also.
linprocfs       /compat/linux/proc      linprocfs rw            0       0

Still no go. :-( arghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh !!
This has been a 2 week process if not longer. And for one application that I
may not even like :-(

I am so lost now I have no idea were to turn or what to do. ? Other than
drink heavily.

Again I am not trying to blame or bitch about this. Just show my confusion
and frustration in trying to install. As a newbie.

If anyone can help me out I would greatly appreciate it.

Thanks
Mark

Mark DeWar




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001b01c39d68$796f9020$fb65a8c0>