The getting started documentation shows how to do this.
I am also having a hard time figuring out how to run an application client jar included inside of EAR file. The getting started documentation only shows how to package the app, and to run it they execute an ant target which in fact doesn't run the application from the EAR but instead runs
java -jar appclient.jar in the build directory.
Does JBOSS in fact have a helper class which extracts the client JAR from the EAR and runs it, or do we have to deploy client JARs separately from the EAR?
kabir's answer is great. but two years elapsed ...
Now we have pretty nice @EJB annotation within there no the ugly JNDI-client code required. please look at http://java.sun.com/j2ee/1.4/docs/relnotes/cliref/hman1m/appclient.1m.html and "Creating a Reference to an Enterprise Bean Instance" chapter on J2ee 5 Sun's tutorial. I think that would be great to have application client container's possibilities in the best app server (aka JBoss)!!!
sorry, my english isn't glance