项目简单结构
import org.apache.commons.logging.Log;
public class Test {
}
用Myeclipse等导出jar文件,如test.jar文件,注意选择main方法。
导出后 新建文件夹目录结构如:
lib下存的是依赖的第三方jar包。
打开test.jar 中的MANIFEST.MF
添加Class-Path,注意“:“后面要有一个空格,如果有多个jar包,空格,lib/others.jar即可。
Class-Path: lib/commons-logging- 1.0.4.jar
运行jar:
当然也可以使用Myeclipse