File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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 ]
I agree. Here's the link:
subject: change the Relative Path reference
It's not a secret anymore!