I\'ve tried both the example in Oracle\'s Java Tutorials. They both compile fine, but at run-time, both come up with this error:
Exception in thread \"main\"
java.lang.NoClassDefFoundError
indicates, that something was found at compiletime but not at runtime. maybe you just have to add it to the classpath.