APPENDIX E: JAVA RUNTIME ENVIRONMENT (Version 1.1.5)
The Java Runtime Environment (also known as the Java Runtime or JRE) consists of the Java virtual machine, the Java platform core classes, and supporting files. It is the runtime part of the Java Development Kit – no compiler, no debugger, and no tools. The JRE is the smallest set of executables and files that constitute the standard Java platform.
Summaries of proper use of the jre and jrew commands:
The jre tool invokes the Java Runtime interpreter for executing Java applications. The tool is available in the Win32, Solaris-Sparc, and Solaris x86 downloads of the JRE. The syntax for the jre command is:
jre [ options ] classname <args>
The classname argument is the name of the class file to be executed. Any arguments to be passed to the class must be placed after the classname on the command line.
An alternative version of the tool, jrew, is available for Win32. The jrew command is identical to jre, except that a console window is not invoked. The syntax of the jrew command is:
jrew [ options ] classname <args>
On Windows platforms, the jre tool will ignore the CLASSPATH environment variable. For both Windows and Solaris platforms, the -cp option is recommended to specify an application's class path.
Options for the jre and the jrew commands are as follows:
-classpath path Specifies the path that jre uses to look up classes. Overrides the default classpath.
-cp path Prepends the specified path to the default classpath that jre uses to look up classes.
-nojit Don't invoke the Just In Time bytecode compiler. The virtual machine directly interprets bytecodes, without converting them to native code.
-v, -verbose Causes jre to print a message to stdout each time a class file is loaded.
-verify Performs byte-code verification on the class file. Beware, however, that java -verify does not perform a full verification in all situations. Any code path that is not actually executed by the interpreter is not verified. Therefore, java -verify cannot be relied upon to vertify class files unless all code paths in the class file are actually run.
-verifyremote Runs the verifier on all code that is loaded into the system via a classloader. verifyremote is the default for the interpreter.
-noverify Turns verification off.
-verbosegc Causes the garbage collector to print out messages whenever it frees memory.
How did we used JRE?
To run ASEP Server program:
jre -cp d:\project\server\server.zip;
d:\jre\lib\jbcl.zip;
d:\jre\lib\jgl.zip
Senior.Server.Server
To run AEP Client program:
jre -cp d:\project\Aep\aep.zip;
d:\jre\lib\jbcl.zip;
d:\jre\lib\jgl.zip;
d:\jre\lib\jclass.zip;
d:\jre\lib\classes111.zip
Senior.AEP.AEP
To run ASP Client program:
jre -cp d:\project\Asp\asp.zip;
d:\jre\lib\jbcl.zip;
d:\jre\lib\jgl.zip;
d:\jre\lib\jclass.zip;
d:\jre\lib\classes111.zip
Senior.Asp.ASP