You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2001/11/02 15:43:35 UTC

DO NOT REPLY [Bug 4590] New: - Javac task may fail if forking and "user.dir" property is not the same as the directory from which jvm started.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4590>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4590

Javac task may fail if forking and "user.dir" property is not the same as the directory from which jvm started.

           Summary: Javac task may fail if forking and "user.dir" property
                    is not the same as the directory from which jvm started.
           Product: Ant
           Version: 1.4.1
          Platform: PC
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: harras@areal.by


Javac task may fail if forking and "user.dir" property is not the same as the 
directory from which jvm started. This is due to the feachure of JDK which does 
not seem to be corrected(see 
http://developer.java.sun.com/developer/bugParade/bugs/4483097.html).
I propose to deal only with absolute paths, for instance in the source file 
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter line 390:

tmpFile = new File("jikes"+(new Random(System.currentTimeMillis())).nextLong());

in my use this file appears relative to the JVM start directory and later this 
file is asked by

commandArray[firstFileName] = "@" + tmpFile.getAbsolutePath();

but .getAbsolutePath() returns file path relative to the "user.dir" property.

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