Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Eclipse path problem while opening file.

Reply
Thread Tools

Eclipse path problem while opening file.

 
 
ck
Guest
Posts: n/a
 
      03-17-2007
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

 
Reply With Quote
 
 
 
 
ck
Guest
Posts: n/a
 
      03-17-2007
On Mar 17, 4:35 pm, "ck" <(E-Mail Removed)> wrote:
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with opening Excel after opening Excel inside Microsoft Internet Controls fniles ASP General 0 04-26-2009 09:39 PM
Eclipse Plugin: how to modify perl build path from an eclipse Plugin java class eser@libero.it Java 1 09-07-2007 09:45 PM
Eclipse - problem with external tool path name. Patrick Finnegan Java 0 04-26-2007 07:32 AM
Tomcat on Eclipse WebApplication Context Path Problem Soren Java 0 03-15-2007 08:39 PM
Help: Problem while opening project in VS.Net 2003 Hongbo ASP .Net 0 06-07-2005 02:23 PM



Advertisments