Why it's failed to load main-class manifest attribute from jar-file?
        Posted  
        
            by Roman
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Roman
        
        
        
        Published on 2010-04-07T10:12:44Z
        Indexed on 
            2010/04/07
            10:23 UTC
        
        
        Read the original article
        Hit count: 1170
        
I have created a jar file in this way jar cf jar-file input-files. Now I try to run it. This does not work: jre -cp app.jar MainClass (jre command is not found).  This java -jar main.jar also does not work (Failed to load Main-Class manifest attribute from main.jar).
I also found out that
To run an application packaged as a JAR file (version 1.2 -- requires Main-Class manifest header)
What is the "Main-Class manifest header" how do I create it and where do I put it?
ADDED
I made a mistake in my original question. The second command I tried was: java -jar main.jar.
© Stack Overflow or respective owner