What is JavaSignals?
Java Signals is a library which provides support for catching 'signals.'
Signals are thrown by most UNIX flavored operating systems. The current
version of Java Signals has been developed for Linux, but I suspect it
would work for other UNIX flavors as well.
It was originally written for two purposes:
-
I wanted to catch SIGHUP so that I could extend JCL
to handle break interrupts.
-
I'm tired of having my Java apps killed without any notification from the
OS. I think it is dumb not to provide this functionality in the base
Java distribution - but they seem to only care about Solaris. ;-)
What is the current JavaSignals version?
The current version of Java Signals is 1.0.
What is needed to use JavaSignals?
-
A 2.0 or later Linux kernel. See linux.org
for all things Linux.
-
Java 1.1 or later. See the Java Linux web page
for downloads.
-
JavaSignals.zip from this site.
How does one install JavaSignals?
The following instructions are basically untested, please send kevinh@geeksville.com
email if they work for you or if you encounter problems. Please send
me any improvements you make to this library.
-
Expand the JavaSignals.zip file - this release includes source and binaries.
-
Add JavaSignals to your CLASSPATH.
export CLASSPATH=$CLASSPATH:<yourexpandeddir>
-
Place libSignal.so in your LD_LIBRARY_PATH or copy it to your jdk/lib directory.
This library contains the native code needed for signal support.
-
Test your installation by running the simple Test application:
java kh.signal.SignalTest
This test will wait for you to send a HUP signal to the process.
To send a HUP signal type 'kill -HUP <processnumber>'
-
Add signal support to your application. You will need to have some
class implement kh.signal.SignalListener. Once you have an instance
of this class, call kh.signal.SignalManager.addListener(yourObject)
Please send me an email if this
works for you - there have been many downloads, but not much feedback.
Who wrote this stuff?
Kevin Hester created/maintains
JavaSignals.
Bernhard Bablok contributed a fix for the problem of JavaSignals breaking RMI registry.
Page maintained by Kevin Hester (kevinh@geeksville.com).
Last updated 3/29/1999.