Subject: Re: java native on NetBSD?
To: Ronald van der Pol <>
From: Stephan Thesing <>
List: current-users
Date: 06/28/2002 13:59:10

On 28-Jun-2002 Ronald van der Pol wrote:
> On Thu, Jun 27, 2002 at 19:26:05 -0400, Steven M. Bellovin wrote:
>> LoadPlugin: failed to initialize shared library
>> /usr/pkg/java/jre/plugin/i386/ns600/ [Shared object "" not
>> found]
>> I wonder if that has something to do with a NetBSD-native program 
>> trying to use a Linux emulator plug-in. 
> Yes, that seems to be true. It won't work. I'm using mozilla too and
> I too would like to have a java plugin for it.
> (

the FreeBSD people have a more or less working JDK 1.3.1 port, 
which can be build from the JDK 1.3.1 sources and a patchset.
NetBSD is also supposed to be supported by their patchset, but at least on -current (and 1.5.*
I suppose) this does not work.

I have made some patches and sent them to Simon Gerraty (after he posted on a NetBSD mailing list)
that should make 1.3.1 compile and work on >=1.5* at least on i386 (haven't tried
other architectures yet. I remember that something like alpha and powerpc is also supported
by the 1.3.1 patchset... not sure about that).

One issue with the code is that thread scheduling in green_threads is done via sigsetjmp/siglongjmp
which behave differently on FreeBSD and NetBSD (on NetBSD, the FPU control word on i386 is not
saved/restored by these routines).
This makes some ugly workarounds necessary to make it work on NetBSD.

For me, JDK 1.3.1 (including the mozilla plugin) works.

I see some problems in that we are not allowed to distribute a binary JDK (if I interpret SUNs
license correctly) via pkgsrc. Compiling from source requires to obtain a (free) license for the
JDK source release from SUNs website.

I think Simon is trying to make my patches work for him at the moment:-)

Maybe there is a chance to see a working native JDK 1.3.1 at least on intel somewhere in the
near future....

Best regards...

=  Tel.: +49-681-302-5571      = Universitaet des Saarlandes =
=  Fax.: +49-681-302-3065      = Postfach 15 11 50           =
=  Compiler Research Group     = 66041 Saarbruecken          =
=  FR 6.2 - Informatik         = GERMANY                     =