Eclipse中使用相对路径来引用Library

来源:互联网 发布:c语言获取随机数 编辑:程序博客网 时间:2024/06/01 10:43

1. 在项目下新建一个lib目录,将所有的外部jar拷贝至lib目录
2. 修改.classpath文件的classpathentry中的path为相对路径,如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
 <classpathentry kind="src" path="src"/>
 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
 <classpathentry kind="lib" path="./lib/log4j.jar"/>
 <classpathentry kind="lib" path="./lib/je-6.1.5.jar"/>
 <classpathentry kind="output" path="bin"/>
</classpath>


Eclipse中使用相对路径来引用Library