Definitive not. You can only deploy JEE applications which are components.
This means, no main-class no IO like Swing or other console input output. And other restrictions.
You should read the oracle or JBoss getting started with JEE guides.
e.g. http://docs.oracle.com/javaee/5/tutorial/doc/
Also the memory management is still Java ;)