ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Kieninger <Markus.Kienin...@jSoft.de>
Subject Re: <java> task: shutdown hook / NoClassDefFoundError
Date Wed, 23 Oct 2002 11:45:14 GMT
Hi,

> 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)

I have got the same problem with the shutdown hook and it is already 
marked in the ant bug database (Bug #8510).

The strange thing is that shutdown hook + ant works fine if you use
jdk 1.3.1 or lower on windows. Starting with jdk 1.4.0 the shutdown hook 
of the forked program is not triggered anymore. I tried this with Ant 
1.5 and 1.5.1.
On linux it always works with all jdk and ant versions.
(-> see my test results)

>     Please help. Thank you.
> 
> Luoh Ren-Shan

Markus


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message