How can I add files to a Jar file?

后端 未结 9 888
自闭症患者
自闭症患者 2020-12-15 19:20

I want to add a series of files previously extracted from other files(already done) to a jar. These files will be overwriting files inside the JAR. What is the most efficien

9条回答
  •  生来不讨喜
    2020-12-15 20:09

    String cmd = "jar uvf " + "jarName" + " " + "Filename";
    System.out.println(cmd);
    try {
    Process p = Runtime.getRuntime().exec(cmd);
    }
    catch (Exception ex) {
    }
    

提交回复
热议问题