Eclipse path problem while opening file.

Discussion in 'Java' started by ck, Mar 17, 2007.

  1. ck

    ck Guest

    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, Mar 17, 2007
    #1
    1. Advertising

  2. ck

    ck Guest

    On Mar 17, 4:35 pm, "ck" <> 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
    ck, Mar 17, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Raghu Raman
    Replies:
    2
    Views:
    343
    Raghu Raman
    Jan 19, 2005
  2. Satya
    Replies:
    4
    Views:
    12,002
    Satya
    Jan 23, 2006
  3. Replies:
    5
    Views:
    22,801
    aime_methe
    Jul 16, 2007
  4. Replies:
    1
    Views:
    711
  5. fniles
    Replies:
    0
    Views:
    260
    fniles
    Apr 26, 2009
Loading...

Share This Page