tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: how can I make my Java code write to a file using relative paths
Date Mon, 10 Feb 2003 23:22:18 GMT
Hello runu,

I'm guessing you are running your app as an NT Service, right?  The
base directory of the JVM becomes that from where it was started.  In
the case of a service, that is C:\WINNT\System32.  If you started
Tomcat from the .bat file which existed in CATALINA_HOME/bin, then
that is where the base directory would exist for your relative paths.

Jake

Monday, February 10, 2003, 3:41:06 PM, you wrote:

rr> Hi all,
rr> I am using the following statement in my .java file

rr> out = new FileOutputStream("responses.txt", true);

rr> I assumed that it should write in a file in the same
rr> directory as the .java file in web-inf/classes

rr> but instead it writes in C:\WINNT\system32

rr> How can I get it to write at a particular place using
rr> relative paths.

rr> I shall appreciate any help.
rr> Thanks,
rr> Runu

rr> __________________________________________________
rr> Do you Yahoo!?
rr> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
rr> http://mailplus.yahoo.com

rr> ---------------------------------------------------------------------
rr> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
rr> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



-- 
Best regards,
 Jacob                            mailto:hoju@visi.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message