public class JarCompile extends Object
| 构造器和说明 |
|---|
JarCompile() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
compileAndZip(String src,
String des,
String name,
File cfg,
List<String> jarContentPath,
ChromeProxy log) |
static void |
compileAndZip(String src,
String des,
String name,
String regex,
List<String> jarContentPath,
ChromeProxy log)
把指定目录src下的所有文件压缩生成名字为name的.jar文件,放到des目录下,如果src中有.java文件,则编译后再压缩
|
static void |
main(String[] args) |
public static void compileAndZip(String src, String des, String name, File cfg, List<String> jarContentPath, ChromeProxy log) throws IOException
src - des - name - cfg - 配置文件jarContentPath - IOExceptionpublic static void compileAndZip(String src, String des, String name, String regex, List<String> jarContentPath, ChromeProxy log) throws IOException
src - 要压缩的文件夹des - 目标文件夹name - 生成的.jar文件名字regex - 匹配正则串jarContentPath - 要提取的jar中的文件路径列表,路径的格式为 "E:\\mywork\\tcyx\\javaPro\\test\\src.jar!net\\itjds\\jartest\\Jartest1.java"IOExceptionpublic static void main(String[] args) throws IOException
IOExceptionCopyright © 2023 onecode. All rights reserved.