bernd kreimeier <[EMAIL PROTECTED]> writes:
> > Yes, you have to tell the VM where it can find classes.zip.
>
> I have a CLASSPATH environment variaable set. The default
> vm_args classpath variable seems broken ("/../.."). What am
> I missing? I could simply replace the default classpath
> entirely, if this is supposed to be invalid.
The CLASSPATH env variable is not passed through to the VM,
you have to replace the default classpath. Also CLASSPATH
usually doesn't contain classes.zip.
>
> > You know that the JNI Invocation API is documented not to work
> > with green threads?
>
> Nope. Where is that documented? I must have missed that. In
> the May 1997 specs of JNI?
It's stated in a very obvious place: The Java Tutorial ;-)
== start qoute ==
Limitations of the Invocation API in JDK1.1
As mentioned above, there are a number of limitations of the
Invocation API implementation in JDK1.1.
The user-level Java thread implementation on Solaris requires the
Java VM to redirect certain Solaris system calls. The set of
redirected system calls currently includes read, readv, write,
writev, getmsg, putmsg, poll, open, close, pipe, fcntl, dup, create,
accept, recv, send, and so on. This may cause undesirable effects
on a hosting native application that also depends on these system
calls.
You cannot attach a native thread to the user-thread based Java
Virtual Machine on Solaris. AttachCurrentThread
simply fails on Solaris (unless it is called from the main thread
that created the Virtual Machine).
You cannot unload the Java Virtual Machine without terminating
the process. The DestroyJavaVM call simply returns an error
code.
These problems will be fixed in future releases of the JDK.
== end quote
See also: http://developer.java.sun.com/developer/bugParade/bugs/4040743.html
>
>
> > The green threads' libjava.so overrides some system calls, so the
> > first thing in a green threads program must be creating the vm otherwise
> > system calls like open() will not work properly.
>
>
> Aahh. This is an information I could have used 3 weeks ago. Darn.
>
>
> > You should go to a solaris machine and test your code with native threads.
> > (I find some time I will try with Solaris 2.6 and JDK-1.1.6 native threads).
>
> Not that easy. Friend of mine will test this. I was under the
> impression that green_threads are used on Solaris, too.
The reference implementation of the JDK for Solaris uses green threads
but there is a native threads add-on for (Solaris 2.6 and patched 2.5.1 only).
The optimized implementation of the JDK for Solaris (2.6, patched 2.5.1)
uses native threads (but is still 1.1.5).
>
> > We really need a native threads vm for linux.
>
> I definitely agree. Wish I had more experience with Linux
> threads. Has anybody tried already? Japhar uses native
> threads, so it shouldn't be a "dream" by default (as the
> FAQ puts it).
I haven't tried japhar for some time, I'll update my cvs tree later.
Juergen
--
Juergen Kreileder, Universitaet Dortmund, Lehrstuhl Informatik V
Baroper Strasse 301, D-44221 Dortmund, Germany
Phone: ++49 231/755-5806, Fax: ++49 231/755-5802