Eclipse path problem while opening file.

C

ck

When ever I try to read/open '.properties' (for that matter any file)
inside my project(for example I try to open system.properties file in
HelloWorld class) it cannot open/find it.

For example if I have a project called project1 which has java source
files in
src folder then and in any of the class files I cant open any of the
files inside the
src folder. No matter where I place the file that has to be read
(inside project1 or src
or build folder) it simply gives me java.io.FileNotFoundException

Instead if I give the complete path it works. How can I read the files
relative to
my project folder without giving the complete path?
It seems that when I run my application in looks in ECLIPSE_HOME/bin
folder, for the
file being read, which of course I don't want to happen.

I am using Eclipse 3.2 (WTP), Windows XP SP2 JDK 1.5.03

Any pointers how to fix this?
 
C

ck

When ever I try to read/open '.properties' (for that matter any file)
inside my project(for example I try to open system.properties file in
HelloWorld class) it cannot open/find it.

It was a classpath problem in the .classpath file, I have fixed the
issue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top