[jboss-user] [Beginners Corner] - Classloading possible?

andrewarc do-not-reply at jboss.com
Tue Feb 10 08:41:21 EST 2009


To briefly outline the problem: I've got an application packaged as .ear, properly deployed and within one of the POJOs I'm trying to do the following:
Use a ClassLoader to load a .class file from my file-system.


  | ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
  | URLClassLoader classLoader = new URLClassLoader(
  | new URL[] {fClazz.toURL()},oldLoader);
  | 			Thread.currentThread().setContextClassLoader(classLoader);
  | 
  | classLoader.loadClass(QName);
  | Class.forName(QName,true,classLoader).getCanonicalName()
  | 

I've already 
Although the File Object fClazz exists and is accessible  by the appserver, I get 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4208556#4208556

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4208556



More information about the jboss-user mailing list