在eclipse中更改默认库路径

时间:2012-11-09 02:26:12

标签: eclipse

在eclipse上运行我的项目时,我收到了这个错误:

    Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang.exception.NestableRuntimeException

通过谷歌搜索,似乎缺少一些类定义,在这种情况下,我需要从here下载库。我在我的项目中添加了它,但问题是,所需的类定义在org.apache.commons.lang3中。所以我问是否有办法将默认路径更改为org.apache.commons.lang3。或者还有其他方法可以解决这个问题吗?

顺便说一句,这是代码:

import java.io.IOException;
import net.sf.json.JSONArray;

public class Main {
public static void main(String[] args) throws IOException {
    JSONArray jsonArray = JSONArray.fromObject( "['json','is','easy']" );  
}
}

1 个答案:

答案 0 :(得分:0)

没关系,我找到了。我只需要下载commons-lang-2.6-bin.zip而不是commons-lang3-3.1-bin.zip

相关问题