Java Reference
In-Depth Information
Appendix A
Installing a Java Application on a PC
In this Appendix, we will show you how to install an application onto a Windows PC from the RAD environment. The
means explaining system environment variables and the software required to run a Java application on a PC. We will
also explore PC batch (.bat) files and show how they make applications easier to use. Finally, we'll demonstrate how
to import files into the RAD environment. The example assumes Chapters 1 and 2 have been completed.
Tutorial: Exporting an Application from RAD
Programmers use RAD to develop applications. Users do not have RAD. Therefore applications have to be installed
onto user's computers. To install an application, the application's .class files must be moved from RAD onto the
computer where they will be run. This is called exporting. In the process of installing a Java application, exporting is
a relatively simple step. The more complicated steps involve installing a JRE and configuring Windows to enable Java
applications.
In the example, the Employee application in myFirstPackage will be moved to a flash memory stick identified as
the F: drive. We are putting the application on a memory stick so that it can be easily transported between computers.
(If you don't have a memory stick, any storage media that has at least 150 megabytes of space is OK. For example, a zip
disk can provide the needed space and portability. At worst, sacrifice portability and use the C: drive.)
1.
In the Package Explorer, select MyFirstProject.
2.
Click File, then Export.
The Export window will be displayed (see Figure A-1 ). Files can be exported in several different formats. For
instance, there are ZIP and JAR format options for Java applications, as well as, WAR (Web Archive File) and EAR
(Enterprise Archive File) options for exporting server-based applications. (In later chapters, the text will cover server-
based applications and how to install them.) All of these formats compress the files. Usually these compressed formats
are used when exporting and installing (rather than exporting the .class files directly) because of storage and transfer
time efficiencies.
 
Search WWH ::




Custom Search