Subject: Re: sun-jre15 works with mozilla-1.7.6 on NetBSD-2.0/i386
To: None <netbsd-java@netbsd.org>
From: BSD For Ever <bsd4ever@nospam.lan>
List: netbsd-java
Date: 03/30/2005 04:35:47
Sorry, I forgot to fold the lines in my previous post. I
have therefore copied the original message below this reply.
If enough people start using sun-jre15 with native builds of
mozilla and report JVM crashes to Sun, we might some day get
a binary distribution of Sun's j2re and j2sdk for the i386
port of NetBSD2 and later for any other port Sun would like.
Before you try to coredump the native mozilla and/or java_vm,
be prepared to wait for hours because the coredumps are really
big: 207 MB for java_vm.core and 54 MB for mozilla-bin.core.
BTW, if you pay taxes in France and wish to crash mozilla and
sun-jre15, first change mozilla's UserAgent signature so that
it contains "Linux" or "Unix" (both work) otherwise
http://www.ir.dgi.minefi.gouv.fr/ will not correctly
recognise your configuration (the authors think that
everithing which is not either Mac OS X, Linux, or Unix is...
M$) and will look in C:\teleir\ instead of ./teleir/ for the
private certificate this web site creates for you.
To change mozilla's UserAgent, first go to "about:" and copy
the string in the second line. You should see something like
Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.7.6) Gecko/20050328
then insert the work Unix somewhere (I replaced U by Unix)
and put that string in the prefs.js file you will find in
a subdirectory of ~/.mozilla. The syntax is:
user_pref("general.useragent.override", "Mozilla/5.0 (X11; Unix; NetBSD i386; en
-US; rv:1.7.6) Gecko/20050328");
==============================================================
Subject: sun-jre15 works with mozilla-1.7.6 on NetBSD-2.0/i386
To: None <netbsd-java@netbsd.org>
From: BSD For Ever <bsd4ever@nospam.lan>
List: netbsd-java
Date: 03/28/2005 23:23:15
Hi folks,
If you have NetBSD-2.0 for i386 and want to add Java support
to your native build of mozilla-1.7.6, follow these simple
steps and you will be running applets in less than 5 minutes
(or more if you haven't built mozilla yet):
First install from pkgsrc the following packages (newer
releases should also work) if you haven't already done it :
mozilla-1.7.6 (www/mozilla)
suse_base-9.1nb5 (emulators/suse_base)
suse_compat-9.1 (emulators/suse_compat)
suse_x11-9.1nb1 (emulators/suse_x11)
sun-jre15-5.0.2 (lang/sun-jre15)
Then issue the following commands (the "$ " prompt indicates
any user can do it, "# " indicates commands that should be
run by root) :
$ cat >/tmp/javaglue15.c <<EOF
#include <stdio.h>
#include <errno.h>
#undef stdin
#undef stdout
#undef stderr
FILE *stdin=&__sF[0], *stdout=&__sF[1], *stderr=&__sF[2];
int *__errno_location(void) { return __errno(); }
EOF
$ /usr/bin/gcc -o /tmp/libjavaglue15.so -shared /tmp/javaglue15.c
# mkdir -p /usr/local/lib
# cp /tmp/libjavaglue15.so /usr/local/lib
# cp -p /etc/ld.so.conf /etc/ld.so.conf.orig
# cat >>/etc/ld.so.conf <<EOF
libX11.so.6 machdep.fpu_present 0:/usr/X11R6/lib/libX11.so
libX11.so.6 machdep.fpu_present 1:/usr/X11R6/lib/libX11.so
libdl.so.2 machdep.fpu_present 0:/usr/lib/libc.so
libdl.so.2 machdep.fpu_present 1:/usr/lib/libc.so
libc.so.6 machdep.fpu_present 0:/usr/lib/libc.so,/usr/local/lib/libjavaglue15.so
libc.so.6 machdep.fpu_present 1:/usr/lib/libc.so,/usr/local/lib/libjavaglue15.so
EOF
# ldconfig
# cd /usr/pkg/lib/mozilla/plugins
# ln -s ../../../java/sun-1.5/plugin/i386/ns7/libjavaplugin_oji.so
Make sure that the maximum data segment size assigned to
your user is at least 262144. This can be done by adding the
following line:
ulimit -S -d 262144
to /etc/profile for sh, ksh, and bash users, and by adding
the following line:
limit datasize 262144
to /etc/csh.login for csh and tcsh users.
You may also wish to set JAVA_HOME to /usr/pkg/java/sun-1.5
and add $JAVA_HOME/bin to your PATH, but it seems this is not
required if you just want to run applets.
That's it. BTW, it works with mozilla-1.7.6 but not (yet)
with firefox.
Among the applets I found at http://java.sun.com/applets/
the following work ok:
http://java.sun.com/applets/other/AudioItem/
http://java.sun.com/applets/other/BouncingHeads/
http://java.sun.com/applets/other/Bubbles/
http://java.sun.com/applets/other/Bullets/alphabullet.html
http://java.sun.com/applets/other/Hangman/
http://java.sun.com/applets/other/ImageLoop/
http://java.sun.com/applets/other/ImageTest/
http://java.sun.com/applets/other/ScrollingImages/
http://java.sun.com/applets/other/TumblingDuke/
http://java.sun.com/applets/other/UnderConstruction/
http://java.sun.com/applets/other/WordMatch/
http://java.sun.com/applets/archive/beta/Abacus/
http://java.sun.com/applets/archive/beta/Cannon/
http://java.sun.com/applets/archive/beta/Crossword/
http://java.sun.com/applets/archive/beta/Escher/
http://java.sun.com/applets/archive/beta/LED/
http://java.sun.com/applets/archive/beta/NeonSign/
http://java.sun.com/applets/archive/beta/Pythagoras/
http://java.sun.com/applets/archive/beta/Voltage/
TThese fail at initialisation:
http://java.sun.com/applets/other/Bullets/dukebullet.html
http://java.sun.com/applets/archive/beta/DiningPhilosophers/
http://java.sun.com/applets/archive/beta/NuclearPlant/
http://java.sun.com/applets/archive/beta/StarField/
http://java.sun.com/applets/archive/beta/SystemInfo/
And this one crashes a couple of seconds after it starts:
http://java.sun.com/applets/other/Bullets/huebullet.html
Oh, I don't know Linux enough to tell if errno codes are the
same as in NetBSD. If this is not the case then
__errno_location should probably be adapted.
Off topic: If you haven't visited http://www.ffii.org/ yet,
please do so before it's too late.
Off topic again: If you want to declare your income in
France, here are the steps :
1) Install the Linux binary distribution of mozilla because
Sun's Java HotSpot(TM) Client VM 1.5.0_02-b09 crashes with
some applets when run from a NetBSD-native mozilla.
To install mozilla-linux (www/mozilla-bin) you can put
"MOZ_PLATFORM=linux" in /etc/mk.conf.
2) wget https://static.ir.dgi.minefi.gouv.fr/secure/installation/crypto/nes6/teleir_cryptolib.jar
"rmd160 teleir_cryptolib.jar" should yeld:
RMD160 (teleir_cryptolib.jar) = 075747651fd4a2279575e776362a081720d7065f
and "ls -lT teleir_cryptolib.jar" should yeld:
-r--r--r-- 1 root wheel 331391 Oct 22 11:22:24 2004 teleir_cryptolib.jar
3) Put teleir_cryptolib.jar in $JAVA_HOME/lib/ext
4) export LANG=en_US.ISO-8859-1 (otherwise the step where
you sign your declaration will fail...)
Do *not* install appletPKIN6.jar, check.jar nor Scroll.jar.
Also remember: Removing your ~/.java directory often solves
problems like corrupted settings.
Regards,
BSD for Ever