I have turned to Perl to launch my Java program.
Now the shutdown hook of my program will be invoked,
and the script works on both Windows and Linux.

Luoh Ren-Shan

----- Original Message -----
From: "Luoh Ren-Shan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 22, 2002 3:44 PM
Subject: <java> task: shutdown hook / NoClassDefFoundError


> Hi,
>     I'm using Ant 1.5.1 + Sun JDK 1.4.0-b92 on Win 2K Pro SP2.
>
>     When using the <java> task to launch my program,
>     I'm in a dilemma about forking or not.
>
>     If I choose not to fork, then I will get some
>     NoClassDefFoundError with sun.reflect.* classes.
>     The problem has been mentioned before,
>     and it seems that Steve Loughran has a fix for it.
>     But 1.5.1 doesn't has the fix inside.
>
>     If I choose to fork, then the shutdown hook of my
>     program will not be triggered while Ctrl+C being
>     pressed on the console window.
>     (ProcessDestroyer.java -> java.lang.Process.destroy()
>      -> Win32Process_md.c -> TerminateProcess()
>      -> shutdown hook will NOT be invoked)
>
>     Please help. Thank you.
>
> Luoh Ren-Shan
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to