How can I add files to a Jar file?

Posted 牛顿的小脑

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了How can I add files to a Jar file?相关的知识,希望对你有一定的参考价值。

https://stackoverflow.com/questions/12239764/how-can-i-add-files-to-a-jar-file

 

 

 

M.java

class M{
    public static void main(String args[]){
        System.out.println("Hello, world!");
    }   
}

 MANIFEST.MF

Manifest-Version: 1.0 
Created-By: 1.8.0_144 (Oracle Corporation)
Main-Class: M

  其实可以接着上一篇文章。。

加入了一个知识点,java  运行jar包。

https://jingyan.baidu.com/article/ff42efa904b4d7c19e220282.html

 

这个命令,将MANIFEST.MF 这个文件添加到了f.jar 中!!

 

以上是关于How can I add files to a Jar file?的主要内容,如果未能解决你的问题,请参考以下文章

Git does not apply deleted files when merging an old branch into the master. How can I tell Git to a

iOS项目添加.pch文件 / How to add a .pch file to an iOS project

How to add elements to a List in Scala

How do I get add-apt-repository to work through a proxy?

How can I create a zip archive of a whole directory via terminal without hidden files?

iOS - Swift Enumerations or how to annoy Tom