Thanks Jim, I'll give it a try.
-----Original Message-----
From: Jim Allers [mailto:jim@advancedreality.com]
Sent: Thursday, February 27, 2003 11:17 AM
To: Ant Users List
Subject: RE: Jikes creating temporary files on windows
It does use a finally block to delete the temp file, but since ctrl-C
causes the VM to shutdown, the finally block is never reached.
What would probably work in this case is File.deleteOnExit() or a
shutdown hook. I would probably prefer File.deleteOnExit(). If you are
comfortable building the ant source, you can modify
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeEx
ternalCompile() to invoke tmpFile.deleteOnExit() and see if that solves
your problem.
-----Original Message-----
From: Marc Novakowski [mailto:marc@kenamea.com]
Sent: Thursday, February 27, 2003 12:25 PM
To: Ant Users List
Subject: RE: Jikes creating temporary files on windows
I haven't looked at the Ant source code, but is there any way to delete
the temporary file using something like a "finally" block or Java's
File.createTempFile() auto-deletion (if that works)?? Or does the fact
that CTRL-C kills not just the app but the entire VM mean that neither
of these will work?
Marc
-----Original Message-----
From: Jim Allers [mailto:jim@advancedreality.com]
Sent: Wednesday, February 26, 2003 7:41 PM
To: Ant Users List
Subject: RE: Jikes creating temporary files on windows
If you set fork="true" and use "javac", i think it will still create the
temporary file. The temporary file is created by Ant when the list of
source files is too big to passed through the command line.
-----Original Message-----
From: Marc Novakowski [mailto:marc@kenamea.com]
Sent: Wed 2/26/2003 7:00 PM
To: user@ant.apache.org
Cc:
Subject: Jikes creating temporary files on windows
When compiling a large number of classes at once, it appears that when
Ant is configured to use jikes it will create a temporary file called
"filexxxx" or "file-xxxx" where xxxx is some random number. The
temporary file contains a list of all the java files being compiled. It
then removes this file when the jikes is complete. However, if the
compile is interrupted (such as hitting CTRL-C when a long list of
compile errors is being spewed back), it will fail to delete the
temporary file. If I switch the compiler to "javac" it doesn't appear
to create any temporary file.
Is this a known bug? Is there some way to work around it other than to
add a <delete> task to my clean target to get rid of "file*" files
(which may be dangerous).
My configuration is as follows:
- Apache Ant version 1.5.1 compiled on October 2 2002
- Windows 2000 Professional
- Jikes 1.18 (also tried Jikes 1.15 with same results)
Thanks,
Marc
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
|