tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From runu rathi <runura...@yahoo.com>
Subject Re: how can I make my Java code write to a file using relative paths
Date Tue, 11 Feb 2003 06:58:30 GMT
Thaks Jake and Tim,

  Thats right, I am running it as an NT service. So,
how can I change my base directory to point to the
desired directory?

Thanks,
Runu 
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



__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.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