Subject: unpacking j2re (Was: glue for current native browsers to enable Sun's JVM plugin)
To: None <>
From: BSD For Ever <bsd4ever@nospam.lan>
List: netbsd-java
Date: 04/30/2004 15:29:41
In my first post in this thread, I made a couple of mistakes.

> Step 2. Go to and then to  
> and click on the blue "download" below JRE to fetch
> j2re-1_4_1_07-linux-i586.bin
> Then
> $ chmod +x j2re-1_4_1_07-linux-i586.bin
> $ ./j2re-1_4_1_07-linux-i586.bin /tmp
> # mkdir -p /usr/local/java
> # mv /tmp/j2re1.4.1_07 /usr/local/java/sun-1.4.1_07
> # chown -R root:wheel /usr/local/java/sun-1.4.1_07

Sorry, this step is wrong because the archive does not use $1 the way
I though it would. What you need to do after you download
j2re-1_4_1_07-linux-i586.bin into /path/to/distfiles is :
$ cd /tmp
$ /path/to/distfiles/j2re-1_4_1_07-linux-i586.bin
# mkdir -p /usr/local/java
# mv /tmp/j2re1.4.1_07 /usr/local/java/sun-1.4.1_07
# chown -R root:wheel /usr/local/java/sun-1.4.1_07

To tell the truth, instead of running j2re-1_4_1_07-linux-i586.bin
I used unzip and a ramdisk to reduce the activity of my hard disk to
the minimum :
# mount -t mfs -o rw,-s=24M,noasync swap /mnt
# mkdir -p /usr/local/java
# mkdir -m 777 /usr/local/java/j2re1.4.1_07
$ cd /path/to/distfiles
$ tail +346 j2re-1_4_1_07-linux-i586.bin >/mnt/
$ unzip /mnt/ -d /usr/local/java
# umount /mnt
# cd /usr/local/java
# mkdir -m 755 j2re1.4.1_07/.systemPrefs
# touch j2re1.4.1_07/.systemPrefs/.system.lock
# touch j2re1.4.1_07/.systemPrefs/.systemRootModFile
# chmod 644 j2re1.4.1_07/.systemPrefs/.system*
# chmod go-w j2re1.4.1_07
# chown -R root:wheel j2re1.4.1_07
# mv j2re1.4.1_07 sun-1.4.1_07

> These either freeze, crash or yeld "Applet <name> notinited" :

I was told most of these do not work either on Safari (Apple's
browser for Max OS X) with an 1.4.1 JRE (1.4.2 is however available),
so this makes me think those applets require at least 1.4.2.

> To get rid of step 6, add
>         JAVA_HOME=/usr/local/java/sun-1.4.1_07
>         export JAVA_HOME
>         ulimit -S -d 262144
> to /etc/profile
> and
>         setenv JAVA_HOME /usr/local/java/sun-1.4.1_07
>         limit datasize 262144
> to /etc/csh.cshrc

/etc/csh.cshrc is not the best place to put the JAVA_HOME definition
and the limit command. It works but it is not as smart as putting
these in /etc/csh.login which is only executed once when a user logs

Remember, this glue only works for i386-current with a 1.4.1_07 JRE.
I might come back some day with some glue for pkgsrc/lang/sun-jre13
(1.3.1_11) which also works for 1.6.x stable releases.

Sorry about my hiding my e-mail. I hate the junk mail that comes out
of most windows boxes.