To JBuilder users concerning the use of keyboard input: (Oct. 7, 2001) It appears that when running java programs within the JBuilder environment, a user cannot signal the end of keyboard input even though there is a window on the bottom of the screen to read input to the program and to output from the program. I believe this limitation is due to the use of JBuilder Personal version which is downloaded for free. The Professional and Enterprise versions have more features in regard to user interactions, as indicated in the Help menu of JBuilder, but you have to pay to get those versions. Thus, you can still compile your java programs within the JBuilder environment, and use its debugger except for testing the end of keyboard input. However, you can run your compiled java byte code (i.e. the .class files) separately in a Command (DOS) Prompt Window, which allows keyboard input, end of keyboard input using Ctrl-Z, IO redirections, etc. The following describes how this works. Suppose I created a JBuilder project named hw3 under the directory c:\lang on my C drive. Suppose the project properties are set up as follows: JDK: java 1.3.0_02 Output Path: C:/lang/hw3/classes Backup Path: C:/lang/hw3/bak Working Directory: C:/lang/hw3 Source: C:/lang/hw3/src Suppose the java program in the project is TestToken.java (this is the sample we discussed in the class). I put this .java file under the source directory C:\lang\hw3\src. The JBuilder environment created after Make Project the TestToken.class under the Output Path c:\lang\hw3\classes. Under the Project Properties window, under the Run option you choose TestToken as the main class. Then you run the project. At this point, you see a very long line appearing in the output window on the bottom of the JBuilder screen: C:\jbuilder5\jdk1.3\bin\javaw -classpath "C:\lang\hw3\classes;C:\jbuilder5\jdk1.3\demo\jfc\Java2D\Java2Demo.jar;C:\jbuilder5\jdk1.3\jre\lib\i18n.jar;C:\jbuilder5\jdk1.3\jre\lib\jaws.jar;C:\jbuilder5\jdk1.3\jre\lib\rt.jar;C:\jbuilder5\jdk1.3\jre\lib\sunrsasign.jar;C:\jbuilder5\jdk1.3\lib\dt.jar;C:\jbuilder5\jdk1.3\lib\tools.jar" TestTokens (All these on one single line!) You notice that the command is javaw under the directory C:\jbuilder5\jdk1.3\bin. What you need to do is to create a Command (DOS) Prompt window. Change directory to where the .class file is located (in this case it is c:\lang\hw3\classes). Copy the previous long line to the Command Prompt Window but dropping the letter "w" from the javaw command (i.e. use the "java" command), keeping everything else of the long line. Press the Enter key, then you are "running" the program in a separate Command Prompt window outside of the JBuilder environment. Now you can enter the input lines, etc. Of course the exact strings on this long time you enter into the command Prompt Window vary depending on your project name, directories used, etc., but the process is the same. To signal the end of input from the keyboard in this Command (DOS) Prompt window, enter CTRL-Z all by itself on a line (i.e., hold the Ctrl key down and type the z key). Then press the Enter key, which will be taken as indication of the end of keyboard input; thus, the readLine() method returns null. Another feature we mentioned in the class is about input redirection. That is, instead of entering your keyboard input each time you are running your program, you can run your java program and let it read from an input file (without changing your program at all) by the following command: (The java command copied and modified from JBuilder) < input1.txt The "<" symbol causes input redirection, i.e., reading the lines from the file input1.txt as if they are typed at the keyboard. In this case, you wouldn't even need to worry about end of file indication; it will be taken care of automatically when the input reaches the end of the input file. IO redirection is a standard feature of the underlying operating system. Similar to input redirection, you can also use output redirection using the ">" symbol, such as: (The java command copied and modified from JBuilder) < input1.txt > out1.txt which reads from the file input1.txt and ends the output to an output file as named.