File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes can't find correct classpath for the required properties file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "can Watch "can New topic
Author

can't find correct classpath for the required properties file

Max Bean
Ranch Hand

Joined: Mar 09, 2006
Posts: 31
As I've been trying to make something like:

FileInputStream propFile = new FileInputStream("src/props/myProperties.txt");

but the compiler keeps complain:

Caused by: java.io.FileNotFoundException: class path resource [src/props/myProperties.txt] cannot be opened because it does not exist

Any suggestion about the thing/article/stuff to read on, and then I can obtain sharp understanding to get it done myself?

Thnx
Mr Newbie
Gaurav Faujdar
Greenhorn

Joined: Apr 11, 2007
Posts: 7
try something like

to know where you program is trying to read the file from.
[ August 01, 2007: Message edited by: Gaurav Faujdar ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can't find correct classpath for the required properties file