what the java command's -jar option really does
        Posted  
        
            by 
                JBoy
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by JBoy
        
        
        
        Published on 2014-06-04T09:04:11Z
        Indexed on 
            2014/06/04
            9:25 UTC
        
        
        Read the original article
        Hit count: 267
        
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.
© Stack Overflow or respective owner