Running GUI programs from MCH 315 (lab)

Because I've had some questions about running GUI programs from the ACNS labs, I checked the situation in MCH 315. The lab computers do have XWin32 (trial version) on them, but they are not configured like the ones in the MCH 128 classroom (run by the CS department). Remember, having an X server (like XWin32) running is necessary for tunnelling graphics through the SSH connection.

When you run the XWin32 application from MCH 315, it asks for a bunch of configuration settings. I will check on these and post more info later, if possible. However, there's an easier way!

An Easier Way (from MCH 315)

In checking a couple machines in this lab, I found that they had the JRE (Java Runtime Environment) on them -- which means they have the "java" command installed. One of the machines I checked had the J2SDK as well (but not all). So, you should be able to run GUI applications directly from those machines, from the DOS prompt. Here's how:

  1. Run the "CS Login" program to mount your unix directories to the windows machine as the Z: drive
  2. Compile your source code as usual from program.cs.fsu.edu or from linprog.cs.fsu.edu as usual, with the javac command.
  3. Go to the "Start" menu and select "Run". In the box, type "cmd". This should open the MS DOS command line prompt on the lab computer.
  4. At the prompt, switch to your Z: drive with the command:
      Z:
    
  5. Use the cd (change directory) and dir (directory listing) commands from the DOS prompt to navigate to the directory where your compiled program is. (The directory structure should be the same as when you logged into your account with SSH).
  6. Run the program with the java command, from the DOS prompt. For example:
      java Dice
    
    Because you are running it from the machine you are sitting at, there's no need for the graphics "tunnelling" -- your GUI windows should pop up on the machine.

If this doesn't work, then it probably means that the Windows machine you are sitting at doesn't have the "java" command installed (i.e. no JRE or J2SDK). Try another lab machine.

Note: The versions of the J2SDK and/or JRE that I found on the lab machines was Java2 version 1.4.1. Remember that the current version of Java now at sun.com is 1.4.2. So this version is just a touch behind. However, it shouldn't make a lot of difference in what we are writing so far, as we are using libraries (like JOptionPane) that have been standard since Java2 1.4.1. In fact, all the examples in Deitel work with version 1.4.1, since it was published when that was the latest version of Java released.