File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Problems with file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Problems with file " Watch "Problems with file " New topic
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: 24187
    
  34

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problems with file