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

http://issues.apache.org/bugzilla/show_bug.cgi?id=29391

javac task uses user.dir for temporary file instead of java.io.tmpdir





------- Additional Comments From [EMAIL PROTECTED]  2004-06-04 19:45 -------
Yes, you are right.  It happens that this is being called from withing Jasper,
which I have no way to modify to add the tempdir.  I can go and ask tomcat folks
to make this change -- it will be a race of who releases first though :-)  And
when your change is out their change would not be needed anymore.

My preference for the change you just made is that it will always work, what is
some desirable quality for a default.

W.r.t. how we were affected:  Our server JOnAS is started as a system service. 
I would have guessed that the PWD would be /etc/init.d or /usr/share/jonas or
some other system directory -- I have no idea why I got "/".  I've printed from
the javac task:

   [javac] userDir="null"
   [javac] userDirName="/"
   [javac] userDir2="/" 

In any case we would be in trouble as most of these directories are not writable
or should not be writen to anyway (even if the permissions allowed writing by
the 'jonas' user).

Someone wrote a test program to verify the JVM (IBM 1.4.1 and BEA 1.4.2 yeld the
same results):

    | $ cat /tmp/Main.java
    | public class Main {
    |     public static void main(String[] s) {
    |         System.out.println("user.dir=" + System.getProperty("user.dir"));
    |         System.out.println("user.home=" + 
System.getProperty("user.home"));
    |     }
    | }
    | $ cd /var; java -cp /tmp Main
    | user.dir=/var
    | user.home=/home/vadim
    | $ cd /usr/share/; java -cp /tmp Main
    | user.dir=/usr/share
    | user.home=/home/vadim


I am happy with your solution.  I had hopes it would be in 1.6.2 though.

We here will have to distribute a modified version of Ant 1.6.1, or a modified
version of Jasper (with the tempdir) --  or find a way to have the PWD be
something like /tmp.  :-(

Thanks for the prompt response.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to