Tools jar does not exist Eclipse JAVA

I found this question trying to build my project using Ant in Eclipse, and I would get the same error message as above. The suggestions in @Parth’s and other answers to edit the Installed JREs is the first step. What I also needed to run Ant successfully was

  1. Right click on build.xml, select “Run As”, select “Ant Build…” (note the …)
  2. Click on the JRE tab
  3. Change the Runtime JRE to the same thing that you updated in the first stage, and press Apply. (That is, the runtime JRE as you specified by “Preferences” -> “Java” -> “Installed JREs”, as in @Parth’s answer.)

Otherwise it seems that Ant will still try to build with the old JRE that doesn’t have tools.jar. Hope this helps someone.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)