Getting a java.lang.ClassNotFoundException: org.jsoup.Jsoup

gk1 picture gk1 · Nov 21, 2010 · Viewed 17.6k times · Source

I am running my app on google app engine. All I have is a simple servlet that is trying to use Jsoup. However when I run the application I get java.lang.ClassNotFoundException: org.jsoup.Jsoup.

I am using Eclipse so I added the jsoup jar file in the Java Build Path -> Libraries

Answer

BalusC picture BalusC · Nov 21, 2010

You need to put the Jsoup JAR file in the /WEB-INF/lib folder of the webapp. That folder is covered by webapp's default classpath. Also, Eclipse will automagically put all libraries in /WEB-INF/lib folder in the buildpath of the project, you shouldn't need to do that manually. Of course I assume that the project is been created as Dynamic Web Project.