class Test2 { public static void main(String[] args) { if (args.length != 1) { System.out.println("Usage: Test2 "); return; } try { // construct HTMLTokenizer for the URL or the file name passed in as the commandline argument HTMLTokenizer html = new HTMLTokenizer(args[0]); String s; // print out all text tokens while ((s = html.nextTextToken()) != null) { System.out.println(s); } } catch (Exception e) { System.err.println("Exception: " + e); } } }