You need to define a new module like this:
<module xmlns="urn:jboss:module:1.1" name="yourmodule">
And then add a dependency to this module on your application.
You can also directly add the system dependencies to your jboss-deployment-structure.xml
I would pack it into one or even more modules and set a dependency in the MANIFEST (or jboss-deployment-structure) of your EAR.
The JRE lib is not included in the JBoss classpath.
On my side, I add to add some lib to the JRE classpath because I couldn't make them work any other way (things such as Charset Provider, etc...)
In standalone.sh, it seemed quite difficul and dangerous to use java -cp instead of java -jar to load jboss-modules, so I did it that way:
# Classpath for system libraries that can not be loaded as modules
if [ "x$LIB_EXT" != "x" ]; then
(my JAVA_HOME refers to a JDK installation)
Thanks, How would i add all subpackages in a module? Instead of writing each in module.xml. e.g. is there any syntax like <path name="com/abc/*"/>.
Because there are alot of jars and packages.