简体   繁体   中英

How to use a .JAR file class in my project (Eclipse)

I am trying to use a class from org.apache.commons.lang3.ArrayUtils;

I have alread imported the .JAR file into my classpath in ecplise. You can see in the picture below.

https://i.stack.imgur.com/cg2YJ.png [< image here ]

When I hover over the error for ArrayUtils.indexOf (circle in blue). It gives me no option to import class for ArrayUtils.

This is a photo of the .JAR: https://i.stack.imgur.com/WN7pw.png

I cannot figure out how to use ArrayUtils in my code without an error.

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; into Eclipse

and it did not help me specifically.

Also, import on the top

import org.apache.commons.lang3.ArrayUtils ;

shortcut key to import in eclipse is ctrl+space

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM