Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2007

Tip: Looking for answers? Try searching our database.

Eclipse path problem while opening file.

Thread view: 
ck - 17 Mar 2007 12:35 GMT
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?

--
Ck
http://www.gfour.net
ck - 17 Mar 2007 13:19 GMT
> 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.

--
Ck


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.