[英]How to use a .JAR file class in my project (Eclipse)
I am trying to use a class from org.apache.commons.lang3.ArrayUtils;我正在尝试使用 org.apache.commons.lang3.ArrayUtils 中的一个类;
I have alread imported the .JAR file into my classpath in ecplise.我已经将 .JAR 文件导入到 ecplise 中的类路径中。 You can see in the picture below.
你可以在下面的图片中看到。
https://i.stack.imgur.com/cg2YJ.png [< image here ] https://i.stack.imgur.com/cg2YJ.png [<这里的图片]
When I hover over the error for ArrayUtils.indexOf (circle in blue).当我将鼠标悬停在 ArrayUtils.indexOf(蓝色圆圈)的错误上时。 It gives me no option to import class for ArrayUtils.
它让我无法选择为 ArrayUtils 导入类。
This is a photo of the .JAR: https://i.stack.imgur.com/WN7pw.png这是 .JAR 的照片: https ://i.stack.imgur.com/WN7pw.png
I cannot figure out how to use ArrayUtils in my code without an error.我无法弄清楚如何在我的代码中使用 ArrayUtils 而不会出错。
I am still learning Java any help will be appreciated, I have looked at a similar question already: how do I import org.apache.commons.lang3.ArrayUtils;我仍在学习 Java 任何帮助将不胜感激,我已经看过一个类似的问题: 如何导入 org.apache.commons.lang3.ArrayUtils; into Eclipse
进入 Eclipse
and it did not help me specifically.它并没有特别帮助我。
Also, import on the top另外,在顶部导入
import org.apache.commons.lang3.ArrayUtils
;导入
org.apache.commons.lang3.ArrayUtils
;
shortcut key to import in eclipse is ctrl+space
eclipse导入的快捷键是
ctrl+space
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.