我試圖運行Hello World例子found here主動MQ - HelloWorld示例例外
我加的ActiveMQ,全5.5.1.jar到庫已經
它與成功建立以下警告
warning: [options] bootstrap class path not set in conjunction with -source 1.6
但它不運行,我得到這個例外
Exception in thread "Thread-0" java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/jms/JMSException at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:791) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) 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) at hw_testing.HW_testing$HelloWorldProducer.run(HW_testing.java:69) at java.lang.Thread.run(Thread.java:722)
Exception in thread "Thread-1" java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/jms/JMSException at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:791) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) 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) at hw_testing.HW_testing$HelloWorldProducer.run(HW_testing.java:69) at java.lang.Thread.run(Thread.java:722)
... 而線程3和4的例外情況相同
有人可以幫我解決嗎?
優秀的解決方案...作品像魅力.. –
謝謝傑哈,它工作。 –