[antlr-interest] Java 1.4 and Antlr temporary files
    Robert Colquhoun 
    rjc at trump.net.au
       
    Sat Feb 23 02:46:49 PST 2002
    
    
  
Hi,
I was wondering if anyone else is getting a bunch of 'filename.antlr.tmp' 
files in their build directories?
I only noticed this since upgrading to java 1.4 on windows, it does not 
appear to be occurring on unix/java 1.3 or windows/java 1.3.  I traced this 
back to the PreservingFileWriter class in antlr which is doing some sort a 
caching i think.  It creates a temporary .antlr.tmp file which also 
supposedly has deleteOnExit() set to remove it automatically, but for some 
reason this does not happen.
Reading the doc:
http://java.sun.com/j2se/1.4/docs/api/java/io/File.html#deleteOnExit()
...seems to indicate the file will not be deleted if the virtual machine 
has a abnormal exit - which does not seem to be the case.......a bug then 
perhaps?  The only other thing i could think of is the file is being opened 
twice the first one gets destroyed on exit, but the second then flushes as 
the virtual machine shuts down and writes out the file.
PS  Use of deleteOnExit() implies anltr now requires java 1.2+, ie it will 
*not* work on 1.1 VMs like the MS JVM
PPS For some reason lately i am noticing lots of little irritating, but 
harmless things like the above...maybe it is time for a holiday!  ;-)
  - Robert
 
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
    
    
More information about the antlr-interest
mailing list