使用Eclipse IDE在java中设置类路径 [英] Setting the classpath in java using Eclipse IDE

查看:212
本文介绍了使用Eclipse IDE在java中设置类路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Eclipse项目,其中包含一个包含大量JAR文件(旧库)的外部文件夹。而不是在Eclipse中添加所有的jar(添加外部Jar),我宁愿为这个外部文件夹添加一个ref。在配置构建浴中,我添加了外部类文件夹。如果我这样做而不是添加Jar,我的程序就不再编译了。我在使用此选项的方式上遗漏了什么吗?

I have an Eclipse project with an external folder containing a lot of JAR files (legacy libraries) . instead of adding all the jars in Eclipse ("add external Jar"), I would prefer to add a ref to this external folder. In the "configure build bath", I'm adding a "External Class Folder". If I'm doing that instead of adding the Jar, my program is not compiling anymore. Am I missing something on the way I should use this option ?

谢谢

推荐答案

您可以创建新的用户库,

You can create new User library,

开启

"Configure Build Paths" page -> Add Library -> User Library (on list) -> User Libraries Button (rigth side of page)

并创建您的库和(添加Jars按钮)包括您的特定的罐子。

and create your library and (add Jars buttons) include your specific Jars.

我希望这可以帮到你。

这篇关于使用Eclipse IDE在java中设置类路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆