문제

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

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top