问题描述
当我尝试在我的netbeans项目中导入一个zip文件时,我在这行中收到错误
import jericho-html-3.1.src.java.net.htmlparser .jericho。*;
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.*;
即使我添加了zip文件Libraries文件夹。
even though I added the zip file Libraries folder.
推荐答案
您可能希望将库添加到项目中,以便在代码中调用它。
从行导入jericho-html-3.1.src.java.net.htmlparser.jericho。*;
我假设您尝试将源代码添加到项目。这不起作用。
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.
您需要添加库库而不是源代码。库文件具有 .jar
扩展名。
从该库位于 /jericho-html-3.1/dist /
zip文件夹中。
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.
这篇关于如何在netbeans项目中导入zip文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!