what the java command's -jar option really does
- by JBoy
Does the -jar option of the java command also compile the sources before running the main method?
I believe so but i would like to have a better understanding of the internal process, from the man page you can clearly see a small workflow sequence:
-jar
Execute a program encapsulated in a JAR file. The first argument is the name of a JAR file instead of a startup class name. In order for this option to work, the manifest of the JAR file must contain a line of
the form Main-Class: classname. Here, classname identifies the class having the public static void main(String[] args) method that serves as your application's starting point. See the Jar tool reference page and
the Jar trail of the Java Tutorial @
But it does not mention that it compiles the sources.