简体   繁体   中英

POI API APACHE importing to netbeans

I have read some tips in here but i still cant do import like this:

import org.apache.poi.hwpf.HWPFDocument;
import org.apache.poi.hwpf.extractor.WordExtractor;

I have add the zip file (poi-src-3.8-20120326) that downloaded from here to library inmy neatbeans project.

Unzip the file you downloaded, find: poi-3.8-20120326.jar , open NetBeans project, find Libraries , right click on it and select Add JAR/Folder , select the poi-3.8-20120326.jar and thats it. When you do that you can use classes from poi-3.8-20120326.jar . This jar will be on your classpath.

Notice that in the unzipped directory there is also lib folder, these are the dependencies for poi , make sure you add them as well.

You will need the compiled code on the class path. Rather than just the source code. Typically projects distribute these separately.

Take a look into using maven to automatically download dependencies and source for external projects such as poi.

Get the compile working outside of netbeans. Only then open it in net beans.

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