Sorry, that should say, "No, it would NOT really work..."

-> richard

Richard S. Hall wrote:

No, it would really work, because you cannot force everyone to use your class loader to load their classes. Certainly Felix can force bundles to use its class loader, but that is about it.

For example, assume I write MyHost:

   public class MyHost {
      Felix felix = null;
      public MyHost() {
         URL.setURLStreamHandlerFactory(...);
         felix = new Felix();
      }
   }

In such a situation, Felix has no control over the class loader loading MyHost.class, so URL.class would be loaded by some other class loader (most likely the standard app class loader).

-> richard



Reply via email to