title: What do people use class loading for?
body: <p>So, every Java text book talks about how flexible Java is since it can load classes at run time.  Just cobble together a string and give it to <code>Class.forName()</code>, and catch the <code>ClassNotFoundException</code> and handle it. So much for the theory.</p>
  
  <p>Can you give examples of how you've been using Java class loading to achieve a feature which otherwise wouldn't have been possible or easy? Note that I'm <i>not</i> asking "what great things <i>could</i> we do?" - I'm looking for real-world examples, be it an open-source application or - if you can describe this without giving out too much details - a proprietary application.</p>
  
  <p><b>Edit:</b> Sure, the VM loads classes lazily as it needs them. That's a behind-the-scenes thing as long as I'm sure that all classes I'll ever need are there.  How do I handle a <code>ClassNotFoundException</code>? Suppose I've written ten pages worth of text, and the <code>PrinterDriver</code> class can't be found.</p>