Add a system dependency listing the packages in the <path> elements. See the sun.jdk module for an example.
I think this works only the system jars provided by Java.
I tried with my custom jar file which is in classpath and added a dependency to the module but still I get ClassNotFoundException.
Any other suggestions that I can try.
Or alternately is there a way to specify an absolute path to the jar file in module.xml, something like below:
<module xmlns="urn:jboss:module:1.1" name="mymodule">
I tried above but it simply appends the path to the directory that the "mymodule.jar" is in, so is there any way to put an absolute path?