Main-Class is not written to manifest of a jar
问题 when I create a jar file from .class files with either: jar cmvf META-INF/MANIFEST.MF MyApp.jar *.class or jar cmvf manifest.mf MyApp.jar *.class despite a line with main class in the manifest file: Manifest-Version: 1.0 Created-By: 1.8.0_171 (Oracle Corporation) Main-Class: MainClassName I get an error when I start MyApp.jar java -jar MyApp.jar no main manifest attribute, in MyApp.jar when i unpack the jar (in some other folder) with: jar xf MyApp.jar the manifest looks like this: Manifest