This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Tomcat and the fly likes change the Relative Path reference Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "change the Relative Path reference " Watch "change the Relative Path reference " New topic

change the Relative Path reference

P Gupta

Joined: Jan 14, 2002
Posts: 3
I am using tomcat 3.2 as a test environment. Installed in d:\tomcat
I have to read and write data to local file
I am using relative path
String inputFile = "..\\cnvinput";
RandomAccessFile InputRA;
InputRA = new RandomAccessFile(InputFile, "rw");
After Execution an Input File is created in d:\tomcat
So I guess the relative path is being called in reference with d:\tomcat \bin
How do I change the Relative Path reference to my Class Current Directory say
Prabhat Gupta
Rajul King
Ranch Hand

Joined: Apr 12, 2001
Posts: 47
The only way that you can do is to specify an absolute path to c:/wave/WaveProj/bin.
Relative path in this case is not possible.
[ January 14, 2002: Message edited by: Rajul King ]
Consider Paul's rocket mass heater.
subject: change the Relative Path reference
It's not a secret anymore!