Domanda

I'm trying to make this http://htmlparser.sourceforge.net/ code run in eclipse. There instructions are simply "To use the library, you will need to add either the htmllexer.jar or htmlparser.jar to your classpath when compiling and running."

I've added htmllexer.jar and htmlparser.jar to my build path and everything compiles fine. But at runtime eclipse can't seem to find those jar files. I'm not sure how to add those jar files to the runtime classpath....

My eclipse looks like this: enter image description here

È stato utile?

Soluzione

For a web project you have to drop those libraries straight in the /WEB-INF/lib folder of the project. This folder participates in webapp's default runtime classpath. In Eclipse, you don't need to fiddle with the build path properties this way, Eclipse will do all the necessary magic. Don't forget to undo the changes you made before.

Altri suggerimenti

If I understand well, you are creating a web application. In that case, you have to configure properly the Deployment assembly section of your project properties.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top