我有一个Java文件给我,我正在尝试编辑,但是当我点击netbeans中的构建时,我得到下面的错误。它做得很好,直到我做出改变。我不确定为什么jar文件以前会工作,但现在我无法构建它。我是个菜鸟......我怎么得到这些包裹?感谢。
C:\Users\Hendrick Brutsaert\Desktop\scrapers\Investing (1)\Investing\src\investing\InvesterMain.java:15: error: package org.jsoup does not exist
import org.jsoup.Jsoup;
C:\Users\Hendrick Brutsaert\Desktop\scrapers\Investing (1)\Investing\src\investing\InvesterMain.java:16: error: package org.jsoup.nodes does not exist
import org.jsoup.nodes.Document;
C:\Users\Hendrick Brutsaert\Desktop\scrapers\Investing (1)\Investing\src\investing\InvesterMain.java:17: error: package org.jsoup.nodes does not exist
import org.jsoup.nodes.Element;
C:\Users\Hendrick Brutsaert\Desktop\scrapers\Investing (1)\Investing\src\investing\InvesterMain.java:18: error: package org.jsoup.select does not exist
import org.jsoup.select.Elements;
C:\Users\Hendrick Brutsaert\Desktop\scrapers\Investing (1)\Investing\src\investing\InvesterMain.java:19: error: package org.openqa.selenium does not exist
import org.openqa.selenium.By;
C:\Users\Hendrick Brutsaert\Desktop\scrapers\Investing (1)\Investing\src\investing\InvesterMain.java:20: error: package org.openqa.selenium does not exist
import org.openqa.selenium.Keys;
C:\Users\Hendrick Brutsaert\Desktop\scrapers\Investing (1)\Investing\src\investing\InvesterMain.java:21: error: package org.openqa.selenium does not exist
import org.openqa.selenium.WebDriver;
C:\Users\Hendrick Brutsaert\Desktop\scrapers\Investing (1)\Investing\src\investing\InvesterMain.java:22: error: package org.openqa.selenium does not exist
import org.openqa.selenium.WebElement;
C:\Users\Hendrick Brutsaert\Desktop\scrapers\Investing (1)\Investing\src\investing\InvesterMain.java:23: error: package org.openqa.selenium.chrome does not exist
import org.openqa.selenium.chrome.ChromeDriver;
C:\Users\Hendrick Brutsaert\Desktop\scrapers\Investing (1)\Investing\src\investing\InvesterMain.java:24: error: package org.openqa.selenium.interactions does not exist
import org.openqa.selenium.interactions.Actions;
答案 0 :(得分:0)
您应该在项目中包含第三方依赖项jar。
https://jsoup.org/download http://docs.seleniumhq.org/download/
您可以从这里下载。 编辑项目属性,转到库并添加这些jar。应该这样做。
答案 1 :(得分:0)