The JVM execution command

Now, if you only run java, the output will display the short version of help. Since it is quite long, we will show it in several parts. Here is the first section:

It shows three ways to run JVM:

  • To execute a class, a .class file that contains bytecode
  • To execute a jar file, a file with the extension .jar that contains .class files (may be even the whole application) in a ZIP format, which also includes a Java-specific manifest file
  • To execute the main class in a module (a group of .class files and other resources that is better structured than a .jar file), typically an application, or a part of it

As you can see, ...

Get Introduction to Programming now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.