epubjs
Version:
Render ePub documents in the browser, across many devices
8 lines (7 loc) • 1.5 kB
HTML
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Changing the Classpath</title><link rel="stylesheet" href="core.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"/></head><body><div class="sect1" title="Changing the Classpath"><div class="titlepage"><div><div><h1 class="title"><a id="learnjava3-APP-B-SECT-5"/>Changing the Classpath</h1></div></div></div><p><a id="idx11246" class="indexterm"/> Within BeanShell, you can add to your classpath and even
reload classes:</p><a id="I__tt1378"/><pre class="programlisting"> <code class="n">addClassPath</code><code class="o">(</code><code class="s">"mystuff.jar"</code><code class="o">);</code>
<code class="n">addClassPath</code><code class="o">(</code><code class="err">"</code><em class="replaceable"><code><code class="nl">http:</code><code class="c1">//examples.oreilly.com/learnjava3/magicbeans.jar</code></code></em><code class="err">"</code><code class="o">);</code></pre><p>To reload all classes in the classpath, simply use:</p><a id="I__tt1379"/><pre class="programlisting"> <code class="n">reloadClasses</code><code class="o">();</code></pre><p>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.</p></div></body></html>