File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes Help finding file in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Help finding file in Eclipse" Watch "Help finding file in Eclipse" New topic

Help finding file in Eclipse

Unnsse Khan
Ranch Hand

Joined: Nov 12, 2001
Posts: 511

I am using MySQL 5 and Eclipse 3.1 on OS X Tiger.

Created the following file (, in Eclipse:

I also added a file (using Eclipse):

Now, when I right mouse clicked on my project and went to 'Java Build Path',
I added the following jar:


When I tried to run the program using "Run As Java Application", I got the following exception in the Console: (No such file or directory)
at Method)
at TestDB.getConnection(
at TestDB.runTest(
at TestDB.main(

Why couldn't Eclipse detect this file? I created it in Eclipse, so I wonder why it couldn't find its location...

Many, many thanks!
Rajagopal Manohar
Ranch Hand

Joined: Nov 26, 2004
Posts: 183
That is strange.

Does the file reside in the project folder or the source folder

If it is the latter try moving it to the project folder.

A better solution would be to put it into your source folder and get your input stream using this.class.getResourceAsStream("/");

I agree. Here's the link:
subject: Help finding file in Eclipse
It's not a secret anymore!