使用 Eclipse IDE 在 java 中设置类路径 [英] Setting the classpath in java using Eclipse IDE
问题描述
我有一个带有外部文件夹的 Eclipse 项目,其中包含许多 JAR 文件(遗留库).而不是在 Eclipse 中添加所有 jar(添加外部 Jar"),我更愿意向这个外部文件夹添加一个引用.在配置构建池"中,我添加了一个外部类文件夹".如果我这样做而不是添加 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 ?
谢谢
推荐答案
试试这个:
项目 -> 属性 -> Java 构建路径 -> 添加类文件夹.
Project -> Properties -> Java Build Path -> Add Class Folder.
如果它不起作用,请具体说明您的编译失败的方式,具体发布错误消息 Eclipse 返回,我将知道如何处理.
If it doesnt work, please be specific in what way your compilation fails, specifically post the error messages Eclipse returns, and i will know what to do about it.
这篇关于使用 Eclipse IDE 在 java 中设置类路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!