jboss - How to get entire classpath of the modules added to wildfly server -
i have tried below snippet
string path = system.getproperty("java.class.path");
i get
../wildfly-8.2.0.final/jboss-modules.jar string modulepath = system.getproperty("jboss.module.path"); // ../wildfly-8.2.0.final/jboss-modules.jar
and not ones have added in modules
when try
stringbuffer buffer = new stringbuffer(); (url url : ((urlclassloader) (thread.currentthread() .getcontextclassloader())).geturls()) { buffer.append(new file(url.getpath())); buffer.append(system.getproperty("path.separator")); }
getting :
java.lang.classcastexception: org.jboss.modules.moduleclassloader cannot cast java.net.urlclassloader
use getresourceasstream on application class path using same class loader app.
Comments
Post a Comment