University of Cincinnati logo and link  
Dynamic Class Loading
 
  UC ingot Dynamic class loading is very self-descriptive.  We dynamically download the classes that we need.  Think about what this entails - downloading the bytes needed to run a class, and then loading them into the JVM with a class loader.  Sound familiar?  It may.  But either way, it's an excuse for us to use the security manager we've learned.
  • We'll use the class RMISecurityManager.
    • This is a fairly simple class that just has a constructor of its own.  All other methods are inherited from class SecurityManager.
    • We must assign this security manager to be able to dynamically download classes.  So, when we start up our application, we need to add this line:

    • System.setSecurityManager(new RMISecurityManager());

      And that's really all there is to it.
       

 Setting Up Remote Method Invocation