这是因为可以这样执行的jar文件中在meta-inf(自动生成的)下有个manifest.mf文件,其内容为:
Manifest-Version: 1.0
Created-By: 1.4.0 (Sun Microsystems Inc.)
Main-Class: your main class name,比如:hello.HelloWorld
生成步骤:
1.用编辑器写出上面的内容,存在一个文件中,比如:manifest.mf
2.调用jar命令:
jar cvfm mm.jar manifest.mf content_files_here
一切OK了!
Manifest-Version: 1.0
Created-By: 1.4.0 (Sun Microsystems Inc.)
Main-Class: your main class name,比如:hello.HelloWorld
生成步骤:
1.用编辑器写出上面的内容,存在一个文件中,比如:manifest.mf
2.调用jar命令:
jar cvfm mm.jar manifest.mf content_files_here
一切OK了!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货