How do I make the JDK the default JRE? How do I make the JDK the default JRE? windows windows

How do I make the JDK the default JRE?


The answer is "no," there is no way to get the JDK to be the default JVM upon install.

As the other answers point out, you can adjust your path and your JAVA_HOME to point to the JDK, or a different JVM entirely. This is in fact what the Java installation does in the first place.

However, your problem is that you want tools.jar to be found. To do this you can copy it to the ext directory under your default JVM. Check the JDK file structure here. This will probably work.

On the other hand, if modifying the JAVA_HOME and PATH variables for Java seems annoying, remember that it's just one of a series of things we do to keep us sharp just kidding, sucks that we still have to do this in 2009


  1. Download JDK from the website
  2. Once everything is finished, go to Control Panel
  3. Open JAVA
  4. Click on the Java tab and select View
  5. There will be one item present in the list. Change the Java Path from JRE to the JDK you downloaded, like so:C:\Program Files\Java\<your_jdk_version>\bin\java.exe.
    For example, mine looks like this:C:\Program Files\Java\jdk1.7.0_07\bin\java.exe


Copying the tools.jar file to a location where Eclipse is looking for it may work, but is messy and fragile since that's a step you may not remember the next time you upgrade your JDK. Better is to convince Eclipse to look for it in the proper location.

Setting JAVA_HOME to the correct location works for some tools, but Eclipse does not honor it.

A couple of things to try:

  • Make sure your JDK is identified andselected underPreferences->Java->Installed JREs.

  • Make sure Ant is being invoked by theJDK. One clue is that at the top ofthe Console output you should see thepath of the javaw.exe which is beingused. If that path is in the JRE,more convincing is needed. CheckRun->External Tools->External ToolsConfigurations->[your Ant build]->JREand make sure the settings therepoint to the JDK.