当我尝试在我的netbeans项目中导入一个zip文件时,我在这行中收到错误 import jericho-html-3.1.src.java.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.htmlparser.jericho.*;
即使我添加了zip文件Libraries文件夹。
even though I added the zip file Libraries folder.
推荐答案您可能希望将库添加到项目中,以便在代码中调用它。 从行导入jericho-html-3.1.src.java.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.htmlparser.jericho.*; I assume that you try to add source code to the project. This will not work.
您需要添加库库而不是源代码。库文件具有 .jar 扩展名。 从 sourceforge下载zip文件时/projects/jerichohtml/files/jericho-html/3.1/ 该库位于 /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 sourceforge/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文件
发布评论