简体   繁体   中英

How to import zip file in netbeans project

when I was trying import a zip file in my netbeans project, I get a error in this line
import jericho-html-3.1.src.java.net.htmlparser.jericho.*;

even though I added the zip file Libraries folder.

You probably want to add library to your project so you could call it in your code. From the line import jericho-html-3.1.src.java.net.htmlparser.jericho.*; I assume that you try to add source code to the project. This will not work.

You need to add a library library and not source code. The library file has .jar extension. When you download a zip file from http://sourceforge.net/projects/jerichohtml/files/jericho-html/3.1/ The library is in /jericho-html-3.1/dist/ folder of the zip.

For library usage take a look on Sample Programs .

In the Projects window right-click on the name of the project that lacks library -> Properties -> The Project Properties window opens. In Categories tree select "Libraries" node -> On the right side of the Project Properties window press button "Add JAR/Folder" -> Select jars you need.

You also can see MockerTim's short Video How-To .

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