tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From runu rathi <>
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?

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
that is where the base directory would exist for your
relative paths.


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

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

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

rr> I assumed that it should write in a file in the
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
rr> relative paths.

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

Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message