-
1. Re: Use JRE lib/ext classes in the application
guinotphil Mar 13, 2012 9:22 AM (in response to jehanzeb.qayyum)Hello,
You need to define a new module like this:
<module xmlns="urn:jboss:module:1.1" name="yourmodule">
<dependencies>
<system export="true">
<paths>
<path name="com/abc"/>
<path name="com/abc/asd"/>
</paths>
</system>
</dependencies>
</module>
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
-
2. Re: Use JRE lib/ext classes in the application
wdfink Mar 13, 2012 9:31 AM (in response to jehanzeb.qayyum)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.
-
3. Re: Use JRE lib/ext classes in the application
guinotphil Mar 13, 2012 9:45 AM (in response to wdfink)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
LIB_EXT="$JAVA_HOME/jre/lib/ext:/path/to/my/other/libs"
if [ "x$LIB_EXT" != "x" ]; then
JAVA_OPTS="$JAVA_OPTS -Djava.ext.dirs=$LIB_EXT"
fi
(my JAVA_HOME refers to a JDK installation)
-
4. Re: Use JRE lib/ext classes in the application
jehanzeb.qayyum Mar 14, 2012 2:45 AM (in response to guinotphil)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.