[pypy-dev] System calls in Java
Carl Friedrich Bolz
cfbolz at gmx.de
Mon Dec 3 16:13:06 CET 2007
Niko Matsakis wrote:
> So, there are a few system calls that I don't think Java supports, but
> Python does. So far I have found getpid() and setenv(), but probably
> I will run into a few more. Rather than implement the native wrappers
> required myself, I was considering linking against a pre-written
> library. I found two, jnios, used by Jython, and jtux, which seems a
> bit more general. The Jython wrapper is a bit problematic because it
> relies on a lot of Jython classes for building tuples and things. I
> haven't experimented with jtux yet, but it seems to be a
> straightforward wrapper. The biggest problem is that it does not have
> lots of easy-to-download-and-install jar files available for various
> The idea would be that if the library were not present on the
> CLASSPATH, everything would continue to work except those methods that
> require extra support.
> Does this make sense? Anybody have a better idea?
This makes sense to me, for such low-level functions as getpid and
setenv and whatever else is missing from the os module. For things like
the socket module I guess it would make more sense to use some
high-level java api that is more readily available.
Keep up the good work!
More information about the Pypy-dev