Fork processes.

Alex Nicolaou anicolao at mud.cgl.uwaterloo.ca
Tue Feb 9 17:56:41 PST 1999


Godmar Back wrote:

> As an aside, the JNI specification does not say anything about what
> functions are safe to invoke from native code.  Specifically, there
> is no interface to my knowledge that would allow a JNI library to
> make use of such services as file or network I/O, which are provided
[snip]

The interface that Sun intends you to use for file or network I/O from
JNI methods is java.io.*, accessed via JNI's env pointer. Although
writing native code that uses Java is a colossal pain, there's no point
exposing a second file I/O interface; you've got a perfectly good one
already, that interoperates fully with your java code.

In terms of what OS level calls are safe to call, I think their
intention is "none, or as few as possible", but the reality is "almost
all of them if you know what you're doing and can guess what the VM is
doing". 

alex


More information about the kaffe mailing list