| Author |
Problems with file
|
Anand Loni
Ranch Hand
Joined: Jan 20, 2006
Posts: 150
|
|
Hi, I have one java file in a package which has one properties file. Now I want to access this properties file through java file. I dont want to specify location of the properties file. When I just pass name of properties file to File then its unable to find file. Please help me in this problem. Regards, Anand
|
~ Anand,
SCJP 1.5
SCWCD 1.5
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24056
|
|
You want to use one of the getResource() methods in Class or ClassLoader. From an instance method of a class, you can just say something like
|
[Jess in Action][AskingGoodQuestions]
|
 |
Anand Loni
Ranch Hand
Joined: Jan 20, 2006
Posts: 150
|
|
|
thanks a lot
|
 |
 |
|
|
subject: Problems with file
|
|
|