Subject: Re: sun-jre15 works with mozilla-1.7.6 on NetBSD-2.0/i386
To: None <>
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 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 <>
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(); }
$ /usr/bin/gcc -o /tmp/ -shared /tmp/javaglue15.c
# mkdir -p /usr/local/lib
# cp /tmp/ /usr/local/lib
# cp -p /etc/ /etc/
# cat >>/etc/ <<EOF machdep.fpu_present 0:/usr/X11R6/lib/ machdep.fpu_present 1:/usr/X11R6/lib/ machdep.fpu_present 0:/usr/lib/ machdep.fpu_present 1:/usr/lib/ machdep.fpu_present 0:/usr/lib/,/usr/local/lib/ machdep.fpu_present 1:/usr/lib/,/usr/local/lib/
# ldconfig
# cd /usr/pkg/lib/mozilla/plugins
# ln -s ../../../java/sun-1.5/plugin/i386/ns7/

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
the following work ok:

TThese fail at initialisation:

And this one crashes a couple of seconds after it starts:

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 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
"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.


BSD for Ever