This problem occurs when attempting to preverify a jar
in place (that is, the output jar has the same name as
the input jar).
The problem occurs because preverify.java is not using
File.renameTo() properly. File.renameTo() is NOT
guaranteed to work. In fact, on Linux, it fails when
renaming a file across a filesystem (i.e. from local
disk to an NFS mount). THis is a particularly likely
scenario, when the build runs on local disk (for speed)
and then outputs a jar to an NFS mount.
The return value of File.renameTo() must be checked.
From the Javdoc for java.io.File:
public boolean renameTo(File dest)
Renames the file denoted by this abstract pathname.
Many aspects of the behavior of this method are
inherently platform-dependent: The rename operation
might not be able to move a file from one filesystem to
another, it might not be atomic, and it might not
succeed if a file with the destination abstract
pathname already exists. The return value should always
be checked to make sure that the rename operation was
successful.
Parameters:
dest - The new abstract pathname for the named
file
Returns:
true if and only if the renaming succeeded;
false otherwise
Logged In: YES
user_id=1493982
This is a nasty problem. It makes antenna works only on
Windows...