you'll have to make sure the geronimo spec jar (and all other runtime dependencies) are on the classpath when you run your main class.
http://en.wikipedia.org/wiki/Classpath_(Java)#Basic_usage On Wed, Jun 26, 2013 at 4:45 PM, Sean Beck <[email protected]> wrote: > I am trying to compile my java code and need javax.jms.ConnectionFactory. I > am pretty sure I am including the right jar files in the classpath > (geronimo-jms_1.1_spec-1.1.1.jar) because it does create my .class files > properly. However when I run my program it gives me this: > > Exception in thread "main" java.lang.NoClassDefFoundError: > javax/jms/ConnectionFactory > at java.lang.Class.getDeclaredMethods0(Native Method) > at java.lang.Class.privateGetDeclaredMethods(Class.java:2451) > at java.lang.Class.getMethod0(Class.java:2694) > at java.lang.Class.getMethod(Class.java:1622) > at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494) > at > sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486) > Caused by: java.lang.ClassNotFoundException: javax.jms.ConnectionFactory > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) > at java.net.URLClassLoader$1.run(URLClassLoader.java:355) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:354) > at java.lang.ClassLoader.loadClass(ClassLoader.java:423) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) > at java.lang.ClassLoader.loadClass(ClassLoader.java:356) > ... 6 more > > What could be causing this? > > Thanks. > -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta
