To test the Airline Reservation application:
Download and install the free implementation of the Jabber Server from the following URL:
http://www.jabberstudio.org/projects/ejabberd/releases/view.php?id=610
Download the free implementation of Java Document Object Model (JDOM) to read XML files from the following URL:
http://www.jdom.org/
Set the path of the bin directory of J2SDK by executing the following command at the command prompt:
set path=%path%;D:\j2sdk1.4.0_02\bin;
Set the classpath of the lib directory of J2SDK and the jdom.jar file by executing the following command at the command prompt:
set classpath=%classpath%;D:\j2sdk1.4.0_02\lib;D:\jdom.jar;
Copy the ReservationStatus.java, SocketClass.java, SocketConnector.java, ReservationResultTable.java, and XMLReader.java files to a folder on your computer. Use the cd command at the command prompt to move to the folder where you have copied the Java files. Compile the files by using the following javac command, as shown:
javac *.java
To run the Airline Reservation application, specify the following command at the command prompt:
java SocketConnector
The user interface of the Personal Information page appears.
Enter information in the fields of the Personal Information page, as shown in Figure 6-6:
Figure 6-6: Entering Personal Information
Click OK to open the user interface of the Airline Reservation application.
Select Chicago in the From combo box and Boston in the To combo box. Specify the Departure Date and Nationality, as shown in Figure 6-7:
Figure 6-7: Searching for an Airline Schedule
Click the Search button to search for the specified airline schedule.
Select the flight number usa10001 and select the Economy check box to reserve the airline schedule, as shown in Figure 6-8:
Figure 6-8: Reserving an Airline Schedule
Click Submit to submit the reservation information. A confirmation dialog box appears.
Click OK to return to the Airline Reservation window.