title: Is there any way to override library classes in a Java application
body: <p>I am using Eclipse and Netbeans, now preferring Netbeans.  If developing a system class that is in the java library (such as FileReader) is there any way to add that class into an application and have the local one supercede the library copy?</p>
  
  <p>The idea is to be able to work on augmenting a specific class at a time while still using the normal jdk.</p>
  
  <p>Specifically I am working with java.lang.StringBuilder and java.io.FileWriter.</p>
  
  <p>I wrote a modified StringBuilder class.  If I create it in my directory:
  java/lang/FastStringBuilder</p>
  
  <p>javac complains that I am trying to compile a restricted package java.lang.</p>
  
  <p>If I rename the package, then it cannot inherit from AbstractStringBuilder which is not public.</p>
  
  <p>They are making this way harder than it needs to be.</p>