Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何将文件夹转换为jar文件_Java_Batch File_Command Line - Fatal编程技术网

Java 如何将文件夹转换为jar文件

Java 如何将文件夹转换为jar文件,java,batch-file,command-line,Java,Batch File,Command Line,你知道如何使用批处理文件将文件夹转换成jar文件吗 我在网上查了一下,发现了这样的事情: jar cvf program.jar -C path/of/class/files 但我不会列出所有的类文件 谢谢看一看 它解释了如何使用jar工具-C dir只需将当前工作目录更改为dir,后面应该是inputfiles——因此可能-C path/of/class/files。修复了您的情况?您可以尝试的另一个选项是将-C全部删除,并将路径/of/class/files声明为inputfiles,它实

你知道如何使用批处理文件将文件夹转换成jar文件吗 我在网上查了一下,发现了这样的事情:

jar cvf program.jar -C path/of/class/files
但我不会列出所有的类文件 谢谢

看一看


它解释了如何使用
jar
工具
-C dir
只需将当前工作目录更改为
dir
,后面应该是
inputfiles
——因此可能
-C path/of/class/files。
修复了您的情况?您可以尝试的另一个选项是将
-C
全部删除,并将
路径/of/class/files
声明为
inputfiles
,它实际上应该递归地遍历此目录并添加所有内容。

您的意思是什么
,但我不会列出所有类文件
可能不会真的应该是不想要的,虽然它们当然不是等价的:)jar是带有附加元数据的zip文件。