Running Java applications
Java™ applications can be started by using the java launcher or through JNI. Settings are passed to a Java application by using command-line arguments, environment variables, and properties files.
For information about how to pass options to the Eclipse OpenJ9 VM, see OpenJ9 command-line options.
Purpose
The ZFILE java command starts a Java application by starting a Java Runtime Environment and loading a specified class.
Usage
The JVM searches for the initial class (and other classes that are used) in three sets of locations: the bootstrap class path, the installed extensions, and the user class path. The arguments that you specify after the class name or .jar file name are passed to the main function.
Use the following syntax for the ZFILE java
command:
ZFILE java [ options ] <class> [ arguments ... ]
ZFILE java [ options ] -jar <file.jar> [ arguments ... ]Parameters
- [options]
- Command-line options to be passed to the runtime environment.
- <class>
- Startup class. The class must contain a main() method.
- <file.jar>
- Name of the .jar file to start. It is used only with the -jar option. The named .jar file must contain class and resource files for the application, with the startup class indicated by the Main-Class manifest header.
- [arguments]
- Command-line arguments to be passed to the main() function of the startup class.
