The Madcap Library

The Madcap (Machine and Device Capabilities)
library is a package of functions that allows
Java programmers to break out of the "lowest
common denominator" approach and take advantage
of certain platform specific capabilities that
might be available on the runtime platform.
Importantly though - this is done without the
programmer being forced to tie their code to that
platform and without writing any native code
themselves. The library is written using JNI.
Examples of things that are currently working are
'get process ID' (useful for writing a PID file),
'get' and 'set' environment variables and time,
'setuid'/'seteuid'/'setgid'/'setegid', and use of
the tray icon in Windows. The library currently
works with Java on Windows and on Linux but should
be easy to port to other OSes.