How would I make some .jars optional?

I want to make it so that my engine will work without some jars, to a certain point where that jar is needed, and then say something is wrong.

Say, for example, that I need Paulscode Sound System for sound to work, but as long as you don’t use Sound, it won’t throw an error. However, if you try to access sound, it will immediately kill the program, leaving an error.

How would I go about this?

-wes