From Eclipse you should check out (or update if you already have checked out) the projects Development and Framework. Check out by opening the CVS perspective and browsing the code in the cs3733_heineman sourceforge repository. If you already have the projects, then use the Team --> Update command.
If you see any compilation errors with the Development or Framework project, follow the instructions below on "Important note regarding JDK installations".
Once you have a properly built Development and Framework project, right-click on "Development" and select entry "Run As -> Java Application". A list of potential executable Java files is presented to you. Select "MultipleServer - bb". If you get an error "
java.lang.UnsupportedClassVersionError: Bad version number in .class file
then you need to follow the instructions "Important note regarding JDK installations" and perhaps install a new JDK version "Retrieving proper JDK/JRE 1.6 from Sun Microsystems".
If you have a properly installed JDK 1.6 on your computer, the you can execute the same demonstration by executing MultipleServer as shown above. Then do the same and select "KSClient - bb". Connect in and you can send chats to yourself.
To see the multi-user capability at play, right-click on Development and select "Run As -> Java Application" to select "AnotherClient - bb" and you will now have two different clients connected to the same server.
There are numerous JDK versions and I have no way of knowing which one you currently have installed on your computer where Eclipse is installed. For this reason, when you checkout or update a project in Eclipse you may see an error such as:
If you look at the Problems tab at the bottom of the screen, you will see a cryptic error message:
What this is really saying is that you need to properly configure your project to use a Java Virtual machine that is installed on your computer. Right-click on the Development project and select the properties menu item. Select the "Libraries" tab.
Note that the Java Runtime Environment (JRE) associated with the project is JDK 1.5.0_11. This may not be installed on your computer! For example, this is the JDK installed on my home computer but not my work computer!
To enable the code to be compiled, select the "JRE" entry and click on "Edit..." where you will be given the choice of existing JREs that are known by your Eclipse installation.
You will need to select the JRE (or JDK) of version 1.6 or HIGHER. If you don't have one show up in Eclipse in the choice menu, then follow the instructions below.
Any of the selected ones will do. If you don't see any (!!!) then you need to tell Eclipse about the installed JRE/JDK on your machine. You do this by selecting Window -->Preferences --> Installed JREs
You can select "Add..." to add a new one that is already on your machine, most likely in "C:\Program Files\Java\...". Here is what I see when I click on "Add..." and click on "Browse..."
Select the one you want to tell Eclipse about and then click OK. This will now be a valid JDK for use within Eclipse.
If you don't even have a JDK 1.6 on your machine, then you must install from Sun:
Download from "http://java.sun.com/javase/downloads/index.jsp". You should download JDK 6 update 5 (otherwise known ass JDK 1.6.0_05). Follow instructions and the go back to the previous section "Telling Eclipse about an installed JRE".