Changing the Classpath

Within BeanShell, you can add to your classpath and even reload classes:

    addClassPath("mystuff.jar");
    addClassPath("http://examples.oreilly.com/learnjava3/magicbeans.jar");

To reload all classes in the classpath, simply use:

    reloadClasses();

You can do more elaborate things as well, such as reloading individual classes, if you know what you’re doing. See the user manual for more details.