Hi,
> Yes, but how do one actually *stop* the application manually, after having
> denied the System.exit() call? I was playing with the idea to write an echidna
> type app (as a learning experience), but never got started because I couldn't
> solve that simple problem :)
Only allow a given thread to stop the application. A hackish example
would be this:
System.setSecurityManager(new SecurityManager(){
public void checkExit(int status) {
if (!Thread.currentThread().getName().equals("kill
thread")) throw new SecurityException("naughty naughty.");
}
}
You could also use a special magic status number, such as 0xCAFEBABE :)
dstn.
-----------------------------------------------
-- Dustin Lang, [EMAIL PROTECTED] --
(java developer, linux guy, green-haired freak)
Why Linux is so cool: /usr/include/string.h:190:
/* Sautee STRING briskly. */
extern char *strfry __P ((char *__string));
-----------------------------------------------
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]