Disable Cache in URLClassLoader
<p>So I am making a server, a lot like IRC, just to learn more, and here's my problem.</p>

<p>I have commands that each person can call depending on their rights, and each "command" has it's own class all located in one directory. I load all the classes into a HashMap, and it all works great if I add NEW commands, but if I change an old one, nothing changes in it. </p>

<p>So how can I use a URLClassLoader to load classes without caching them?</p>

<p>Thanks for any help.</p>

<p>This is the code I'm using </p>

<pre><code>ClassLoader loader = new URLClassLoader(scriptURLS);
        try {
            for(URL u : scriptURLS) {
                if(u == null) continue;
                String fileName = u.getFile();
                int beginIndex = fileName.indexOf("commands/") + 9;
                int endIndex = fileName.indexOf(".c");
                fileName = fileName.substring(beginIndex, endIndex);
                String name = fileName.toLowerCase();
        Class&lt;Command&gt; c = (Class&lt;Command&gt;) loader.loadClass("chat.commands."+fileName);
</code></pre>

<p>I realize it's not the cleanest or the most efficient code out there, but it works. </p>
