So the problem happens when you
compile (not: run) the application? It sounds a bit strange because from the rest of your message it looks like you actually can compile the app, but that something goes wrong when you run it.
It's a bit hard to tell you exactly where the problem is, because that depends on what your development and build environment looks like. What
IDE are you using? How is the project set up? Are you using a build tool such as
Ant or Maven, are you sure the build script is set up to pick up the libraries at compile time correctly?
You'd have to make sure that at compile time the right jar files can be found, but how you do that depends on your environment.