JBoss standalone program does not use Classpath - why?
Posted on 2011-10-10
I am using JBoss 6.1.0 on RHEL to exchange messages from a JMS queue between 2 separate Java programs (sender and receiver).
The software works when I include all the necessary Jboss library jar files and properties files in my own Java application JAR file.
But when I pull out the Jboss jar files from my own application jar file, I get the java.lang.NoClassDefFoundError exceptions where the system complains about not finding the Jboss jar library files, even when I run the application using a Classpath argument:
java -cp /opt/jboss/client/*.jar:/opt/jboss/lib/*.jar:/opt/jboss/common/*.jar:/opt/jboss/comm-lang.jar:/jboss/server/default/deploy/*.jar -jar MyJossApplication.jar
The exception points back to a Class file to a JBoss library jar file that is included in the Classpath.
Any idea why my invocation method of Jboss is ignoring the Classpath? Thanks.