自己写一个MANIFEST.MF
jar -cvf classes.jar -m MANIFEST.MF classes

解决方案 »

  1.   

    jar cmf manifest-addition jar-file input-file(s)manifest-addition is the name (or path and name) of the existing text file whose contents you want included in the JAR file's manifest. 
    manifest-addition 是楼主想要的manifest内容 它可以是一个文本文件 程序会自动把其中内容copy至manifest中...jar-file is the name that you want the resulting JAR file to have.
    jar-file是生成的jar的名字The input-file(s) argument is a space-separated list of one or more files that you want to be placed in your JAR file.
    这个是所有需要打包的文件列表-_,-
      

  2.   

    谢谢fast_time(fast_time) 和 mayanwei() ( ) 问题解决,不过fast_time(fast_time)导入的MANIFEST.MF文件在根目录上,而不是在META-INF目录中.