如何在 Eclipse 中使用 Jsoup

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11728884/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 18:41:50  来源:igfitidea点击:

How to use Jsoup in Eclipse

javaeclipsejarjsoup

提问by user1423793

I just downloaded Jsoup to use in a program I'm writing in Eclipse. My program uses Seam and I can not figure out how to include the JAR file for Jsoup in my program. Any help would be greatly appreciated. Thanks

我刚刚下载了 Jsoup 以在我正在 Eclipse 中编写的程序中使用。我的程序使用 Seam,我不知道如何在我的程序中包含 Jsoup 的 JAR 文件。任何帮助将不胜感激。谢谢

回答by BalusC

Drop the JAR file in /WEB-INF/libfolder of the WAR, or in the /libfolder of the EAR. Eclipse will do the remaining necessary magic. Don't fiddle with project's Build Pathproperties or things may go worse.

将 JAR 文件放到/WEB-INF/libWAR文件夹或/libEAR 文件夹中。Eclipse 将完成剩余的必要魔法。不要摆弄项目的构建路径属性,否则事情可能会变得更糟。

回答by grenierm5

I did what BalusC recommended above, but I also had to 'refresh' Eclipse in order for the .jar file to be recognized. To refresh, just right-click on the left side window pane within Eclipse and select refresh.

我做了上面 BalusC 推荐的操作,但我还必须“刷新”Eclipse 以便识别 .jar 文件。要刷新,只需右键单击 Eclipse 中的左侧窗格并选择刷新。

Eclipse Version:

日蚀版:

  • Eclipse Java EE IDE for Web Developers
  • Version: Kepler Service Release 1
  • Build id: 20130919-0819
  • 面向 Web 开发人员的 Eclipse Java EE IDE
  • 版本:开普勒服务第 1 版
  • 版本号:20130919-0819

OS: Fedora

操作系统:Fedora