Section B.5. Changing the Classpath


B.5. 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.



    Learning Java
    Learning Java
    ISBN: 0596008732
    EAN: 2147483647
    Year: 2005
    Pages: 262

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net