Java Reference
In-Depth Information
5.
Click the .class option and the OK button.
On the Export window, notice that the check mark next to MyFirstProject has changed to a solid blue square.
This means that the project folder is not selected for export but something in the project is selected. Expanding
MyFirstProject shows that a subfolder called bin has something selected.
Are you wondering where bin came from? Each perspective has a unique view of an application's resources.
The Java perspective does not display the class files or the folders and subfolders that hold them. Continuing to
expand the subfolders would show that inside of myFirstPackage the two class files have been selected for export.
When files in a package are exported, they must be installed in a PC folder with the same name as the package.
The easiest way to do this is to export the package also.
6.
On the Export Window, expand MyFirstProject/bin and click the myFirstPackage checkbox
twice to select the package and its content for export.
7.
Specify F: (or whichever drive letter you are using) in the “To directory” field and make
sure that the “Create only selected directories” radio button is selected.
8.
Click the Finish button.
9.
Verify that the files were copied by clicking on My Computer, then double-clicking the
drive (e.g., the F: drive) and then the myFirstPackage folder.
The two class files will be displayed as in Figure A-4 .
Figure A-4.
Tutorial: Downloading a JRE
The application class files have been successfully exported. Unfortunately, there is no JRE to translate the bytecode
(in the class files) into machine language. We need to download and install a JRE before we can run the application.
There are many sources for a JRE. We will go to the Oracle website. (Be aware that there are frequent updates to
the Oracle website and often the procedure for downloading and installing will change.)
1.
In the Internet Explorer browser, specify
http://www.oracle.com/technetwork/java/javase/ downloads/index.html
The download page will be displayed (see Figure A-5 ).
 
 
Search WWH ::




Custom Search