Java Reference
In-Depth Information
Running the Client Application in Stand-alone Mode
Running in local mode is easy. Navigate to the directory where the sampleproject.jar file is
located.
The java and javaw executables allow you to specify a JAR that you want to execute using
the -jar option. At the command prompt, type the following:
javaw -jar sampleproject.jar alone
The sampleproject.jar file can be anywhere on your machine since the entire project
classes are packaged in the JAR. This should bring up the database location dialog box shown
in Figure 9-6. Select the location of the database (it should be in the root directory) and click
Connect . The main window will then load as shown in Figure 9-7.
Figure 9-6. Starting the application in local mode
Figure 9-7. The application running in local mode
Running Denny's DVDs Server
Running Denny's DVD server requires you to specify the location of the database file, which
port you want to use, and the type of server (RMI or sockets). To start the server, at the com-
mand prompt, type the following:
javaw -jar sampleproject.jar server
This should bring up the server configuration window shown in Figure 9-8. Select the
location of the database (it should be in the root directory), change the port number if desired,
select the network type, and click the Start Server button. The server window will then display
information that it is running and will disable most controls, as shown in Figure 9-9.
Search WWH ::




Custom Search