![]() When you use -jar, the specified JAR file is the source of all user classes, and other class path settings are ignored. The jarfile argument is the name of a JAR file with a manifest that contains a line in the form Main-Class: classname that defines the class with the public static void main(String args) method that serves as your application's starting point. Command-line entries following classname are the arguments for the main method.Įxecutes a program encapsulated in a JAR file. Specifies the name of the class to be launched. See Overview of Java Options for a description of available options. Optional: Specifies command-line options separated by spaces. To launch a single source-file program: java source-file To launch the main class in a module: java -m module To launch the main class in a JAR file: java -jar jarfile The javaw launcher will, however, display a dialog box with error information if a launch fails. Use javaw when you don’t want a command prompt window to appear. Windows: The javaw command is identical to java, except that with javaw there’s no associated console window.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |