title: How do I make the JDK the default JRE?
body: <p>I use Eclipse with ant scripts, and Eclipse works well with the default JRE installation on Windows XP.</p>
  
  <p>The annoyance comes when I want to run ant scripts compiling with the javac-tag, where it fails because there is no tools.jar in the classpath.</p>
  
  <p>I've gotten the idea that if I could make the JDK become the default Java on Windows, then I would have what I have today, plus ant working out of the box.</p>
  
  <p>Can this be done?  What have I missed in the installation process?</p>
  
  <hr>
  
  <p>Edit:  I know of JAVA_HOME, but that is tedious and error prone (manually updating environment variables when a fresher JDK is available is not always something I remember). </p>
  
  <hr>
  
  <p>Edit:  I ended up figuring out how to make the javac task use the Eclipse compiler (ecj.jar), which works very nicely.</p>
  
  <hr>
  
  <p>Edit:  Maven also supports using the Eclipse compiler, but this appears to be very rarely used and with an old version of ecj.jar.  I intend to look in to this at a later time.  </p>
  
  <hr>
  
  <p>Edit: Using ecj with maven-compiler-plugin 3.0 works very well, and allows for building with a JRE.  </p>
  
  <hr>
  
  <p>Edit: I had problems with the javadoc tool crashing when parsing bytecode generated by ecj.  </p>