Jboss does not execute jars, it justs adds them
to the classpath.
If you want to start a piece of code consider writing a MBean. A MBean can be deployed using a .sar file.
For a very quick introduction read:
Almost everything in JBoss is a MBean: it's a usefull concept to learn. Make your own service! Startable, stoppable, manageable via the jmx console.
There's alot of docu around on the web.