0

I pasted the Jsoup .jar file into my project src package. then I right clicked the pasted file and and went to build path>>add to build path. Now I should be able to use Jsoup but whenever I try to import to org.jsoup.* or anything else, the org part has a squigly red syntax error. And I tried to create a document object and used the eclipse auto import option and it still doesnt work so I'm not typing it wrong. Can someone help me please?

  • Use a zip utility to open the `jar` file and to verify its contents. – Scary Wombat Sep 24 '21 at 05:53
  • Its legitimate. Its from jsoup.org. here is the link – CShane13 Sep 24 '21 at 05:57
  • https://jsoup.org/packages/jsoup-1.14.2.jar – CShane13 Sep 24 '21 at 05:58
  • So there is nothing wrong with the .jar file. – CShane13 Sep 24 '21 at 06:02
  • I guess you have a `module-info.java` file in the default package. Either delete it (recommended; if needed, you can it add it later) or in `module-info.java` add the appropriate `requires ...;` statement, e.g. by going to the import statement with the error and hitting Ctrl+1. By the way, you can hover the error marker or go to the _Problems_ view to get the error message. – howlger Sep 24 '21 at 07:40
  • Have you tried moving it out of your `src` folder? What's the text message associated with the red squiggly when you hover over it? – nitind Sep 24 '21 at 14:16
  • @howlger Thank you! it was the module-info.java file. After I deleted it, the problem went away. – CShane13 Sep 25 '21 at 03:42

0 Answers0