我有这样的文件夹结构:
|___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项目。
您可以将所有依赖项包含在JAR文件中。请看这个关于如何做的答案。
还有一些工具可以自动化这个过程,比如Ant和Maven。