JBoss Community

Re: Embedded AS

created by Brian Stansberry in JBoss AS7 Development - View the full discussion

Kabir Khan wrote:

 

I don't think you can change the classpath of an already running java program

No you can't. What that class was doing was an attempt to get the jboss-modules SystemLocalLoader to not load undesired classes. It reads the java.class.path property when determining what jars/directories to load from. That part actually seems to work.

 

The problem is the static intializer block in java.util.logging.LogManager tries to use ClassLoader.getSystemClassLoader() to load the class. And that classloader's unaffected by my change of the system property.

 

And that problem would affect your #2 solution as well. :( The true system classloader is not controlled by jboss-modules, so any time some code uses it, it will see the original classpath.

 

Do you know how the Arquillian guys are dealing with this problem?

Reply to this message by going to Community

Start a new discussion in JBoss AS7 Development at Community