You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Luoh Ren-Shan <lu...@iii.org.tw> on 2002/11/12 04:42:02 UTC

Re: task: shutdown hook / NoClassDefFoundError

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" <lu...@iii.org.tw>
To: <an...@jakarta.apache.org>
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:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>