title: Replace a class within the Java class library with a custom version
body: <p>The class <em>BasicLabelUI</em> in <em>javax/swing/plaf/basic</em> is affected by a <a href="http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7172652" rel="noreferrer">confirmed bug</a>.
  In my application I <em>need</em> functionality provided by the <a href="http://hg.openjdk.java.net/jdk9/jdk9/jdk/file/f4fb05e323a0/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicLabelUI.java" rel="noreferrer">fixed version (filed for v9)</a>.
  Due to both legal and technical reasons, I'm still bound to the affected JDK version.</p>
  
  <p>My approach was to create a package <em>javax/swing/plaf/basic</em> inside my project, containing the fixed version.</p>
  
  <p>How can I force my project to favor my included version of the class over the defective class in the installed JDK?</p>
  
  <p>This has to be somewhat portable as the fixed class also has to be working on customer side and the defective class in the JDK installation has to be disregarded. Therefore, I dont want to modify the JDK, but rather bypass this particular class.</p>