The Java interpreter starts the Java runtime environment, loads the specified class, and invokes that class(s) main method.

 


Funny Bone

Wife: "John steals money from wherever I keep it."

Husband: "Keep it in his books, he never touches them."

Chapter 1

Executable Java Archives

 

 

Introduction

Java applications are generally run using the Java interpreter ("java.exe") from the Java Development Kit (JDK). The interpreter is platform-specific and is essential for executing a Java application. The "java.exe" program interprets the bytecode generated by the compiler. The Java interpreter is launched from the Windows command prompt in the following form:

java classfilename

In fact, no user would like to enter something like this on the command line to start an application. What is the solution to this problem? Let(s) try to find out the solution.

In this chapter, you will learn how to create an executable Java archive (jar) file. The source code needed for the first example is stored in the HOME\examples\Chapter1 directory. The "Chapter1" directory contains the following files:

MyFrame.jar
MyFrame.java
MyFrame.mft


HOME is the directory in which this tutorial is installed.


Contents         Top                              Move to the preceding page Move to the next page
© 2001 www.universalteacher.com. All rights reserved