将依赖关系与JAR链接

时间:2014-10-02 15:00:19

标签: java

我有这个文件夹结构:

|___main
| |___lib -> this folder contains my runnable jar file
| |___ext -> this folder contains dependency files (.jar) for the jar
|___log4j.properties -> here I have log4j.property file

如何在没有ClassNotFoundException或任何其他错误的情况下执行JAR?我正在使用Eclipse Luna,这是一个Java项目。

1 个答案:

答案 0 :(得分:0)

您可以在 JAR文件中包含所有依赖项。有关如何操作的信息,请参阅this answer

还有一些工具可以自动完成此过程,例如AntMaven