The Artima Developer Community
Sponsored Link

Legacy Design Forum
Designing with Runtime Class Information

Advertisement

Advertisement

This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Not a bug, exactly

Posted by Scott Bain on February 12, 2002 at 5:51 PM

This is not really a bug. The java System property java.class.path is used to build a linked link when the JRE is instantiated, then is not re-read. Therefore, changes you make to the property don't really do anything to the existing virtual machine.

-Scott Bain-


> There is a bug in Java. Because i got the same problem while i was working on my project.
> This bug can be seen by going to sun java web site.

> > How can I change classpath at runtime?

> > System.setProperty("java.class.path","%x%"); is executed,
> > System.getProperty("java.class.path"); shows new classpath, but
> > Class.forName("some.class.that.is.in.%x%");
> > throws an exception.





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us