简体   繁体   中英

how to import a library and use a class within that library in eclipse

I am a begginer in Java and I am currently importing a library which provides me with a deepClone() method. The aforementioned library uses a class named Cloner . After importing the library via ->Properties-> Java Build Path -> Add External Jar -> selecting the zip file, I try to use that class but everytime I try to create a Cloner object a warning message appears cloner cannot be resolved to a type .

I might need to import the class but as it's my first time doing this I can't really tell, I looked it up but I can't seem to find a straight answer.

Feel free to ask for a screenshot or anything that you need in order to solve this headcracker!

This zip file is just a sources which you shoud compile by youself, but you can download jar file and import it from maven repository . Direct link for latest version (17 May 2016) direct link

In pom.xml you can see groupId and artifactId so you can find artifact in maven repo in the future

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