First, make a jar file with your project classes.
Second, put this jar in lib directory (...server\default\lib).
Third, start the server. In boot.log you can see your jar file deployed.
Ej output: 01:36:12,383 DEBUG [SARDeployer] deployed classes for file:/jboss/jbossadm/jboss-4.0.3/server/all/lib/your_program.jar
I hope help you.
It's perhaps cleaner to use a mbean service, for this use the jboss annotations @Service and @Management.
See the tutorial : http://docs.jboss.org/ejb3/app-server/tutorial/service/service.html