aspose file tools*
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "change the Relative Path reference " Watch "change the Relative Path reference " New topic
Author

change the Relative Path reference

P Gupta
Greenhorn

Joined: Jan 14, 2002
Posts: 3
Hi
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");
InputRA.write(InputArea);
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
C:\wave\WaveProj\bin
thanks
Prabhat Gupta
Rajul King
Ranch Hand

Joined: Apr 12, 2001
Posts: 47
Prabhat.
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 ]
 
jQuery in Action, 2nd edition
 
subject: change the Relative Path reference