You need to add the jars to the NetBeans project you're working on; this in turn will add them to the runtime classpath.
If you don't already, you need to understand what a classpath is and that a compile-time and a runtime classpath may be different, and learn that it is set and maintained differently in NetBeans (and many other IDEs) and in stand-alone
Java, which in turn is different from a
J2EE server environment (
JBoss, WebSphere, etc.)