Reputation: 5839
I want to use javax.jms in netbeans project , but netbeans tell my that there is no package like this , what should I do ?
this error occurs when I try from terminal
Exception in thread "main" java.lang.NoClassDefFoundError: javax/jms/MessageListener
Upvotes: 1
Views: 1761
Reputation: 28049
You have to have the jms-api.jar
in your classpath. I got mine from HornetQ.
Edit
I just saw that you said you were using NetBeans. In that case, you need to have downloaded the version of NetBeans that includes Java EE. Go here and download that. This site seems to have a nice tutorial on how to set it up from there.
Upvotes: 1