BufferedReader br = new BufferedReader(new FileReader("c:/test.txt"));
String strLine;
while((strLine=br.readLine())!=null) {
if (strLine.length()>0) System.out.println(strLine);
}
Of course, you will probably want to write those lines back out to a file instead of printing them to System.out.