Strange difficulty:
1. I have a JMS client to subscribe a JMS topic, say,
client.java
2. If I run this client in this way: java -classpath
$ALLCLASSPATH client, it is working, where ALLCLASSPATH
include all jars in .../jboss-2.4.4/client.
3. Now, I jar client.class into a jar, say, cc.jar, then
run in this way: java -jar -classpath $ALLCLASSPATH cc.jar
Now, I got this exception :
Exception in thread "main" java.lang.NoClassDefFoundError :
javax/jms/JMSException
I think this should not happen. But, it does. Then how
to overcome this problem? Why it happens?