| Author |
finding a common file with System.getProperty?
|
Yoo-Jin Lee
Ranch Hand
Joined: Nov 01, 2000
Posts: 119
|
|
Hi, I'm trying to access the contents of the same file from a class that is invoked from a servlet and also an object invoked from the command line, in Windows NT. I don't want to hardcode the path either. My code: File currentDir = new File(System.getProperty("user.dir")); File f = new File(currentDir,"tist.ini"); My problem is that from the servlet, the classpath to the file is c:\Winnt\system32 and from the dos command line it is the current directory. I tried to include the file to the current classpath but no dice. (ie. classpath=..(previous stuff)..;c:\temp\tist.ini) I guess I can create a small program that could search the whole directory tree but is there a better solution? Thanks. Yoo-Jin.
|
 |
 |
|
|
subject: finding a common file with System.getProperty?
|
|
|