8 Replies Latest reply on Aug 8, 2008 11:48 AM by mlk

    Reading .txt file from classpath

      Hi all,

      I am using eclipse to develop a project where i need to read .txt files from a external folder. I added that folder to classpath and can see it using System.getProperty("java.class.path");.
      When I use ClassLoader.getSystemClassLoader().getResource("x\\abc.txt") to read a file it does not work. I was wondering why i can see target folder in the classpath but getResource does not
      read a file from it.

      Folder structure is like this:


      Thanks in advance.