JAR
理论上可以包含任何文件,但是实际中我们多用于包含class。但是我们需要包含一个manifest从而告诉jar从哪里作为入口开始运行。
下面代码给出了如何打包以及如何运行打包了的jar包
jar cvmf manifest.txt executable.jar .
java -jar executable.jar
同时jar还可以用于普通zip的打包,也可以运用与解压
压缩
jar -cvf xxx.zip xxx xxx xxx
解压
jar -xvf xxx.zip(jar)
除了jar指令,zip与unzip也可以被使用压缩或者解压缩
当然还有其他指令可以查看jar包中内容等
Makefile
Target: Name of a list of the rules
Dependency: files or other target that a rule depends on
Rules: command to execute