File Viewer
David Matuszek, September 2000

Many compilers, including SWI-Prolog, tell you what line number an error occurred on. Neither NotePad nor WordPad will display line numbers. You can display line numbers with Microsoft Word, but it isn't easy (for details, ask the paperclip, "insert line numbers").

FileViewer is a simple Java program to display the contents of a text file along with line numbers.

fileviewer.gif (5717 bytes)

To install this program,

  1. Download the files FileViewer.class and FileViewer$Close.class
  2. Make sure both files are in the same folder.

To use the program,

  1. Choose Start => Programs => MS-DOS Prompt
  2. Navigate to the folder containing the above .class files.
  3. At the prompt, type in java FileViewer
  4. Type in a line number and click Show (or just use the scroll bars).