I created two version of my program using a buffered reader.. my first version I made using notepad and the second version using Netbeans IDE...
my code "new BufferedReader(new FileReader("data/list.txt")" works on my notepad version though FileException error on my Netbeans IDE although it works if i use absolute path like "(c:/data/list.txt)"... in java, how do i use relative paths?

And your file exception is? (FileNotFound I'm betting). That simply means that your program is executing using a different "current working direcetory" than what you expect (which can always be the case whenever it is run). You should avoid using relative paths and attempt to use the complete path (or a path dependent on the classpath and getResource...).