You may already be doing this, but in cases where the class may or may not be on the classpath at runtime I'd recommend using ClassLoader to explicitly load the class, taking appropriate action if the class is not found (as this doesn't sound like an error condition in your case). It'll make the code a lot clearer to read rather than having something like:
try {
new MyClass(); // Could potentially thrown a ClassNotFoundException.
// ... yada yada
} catch(ClassNotFoundException ex) {
// Do something else instead.
}
Other approach you might want to consider is wrapping your library calls in an adapter layer and providing a No-Op implementation of the adapter in cases where the library isn't available, making the rest of your code agnostic to whether the library is present or not.