On Jan 15, 2008, at 2:57 AM, Andreas Grob wrote:

Hi,

After installing a new java version I got following error:

Unable to locate tools.jar. Expected to find it in
C:\Programme\Java\jre1.6.0_04\lib\tools.jar
Buildfile: build.xml

Well, my workaround is to copy tools.jar from the path
...\jdk1.6.0_04\lib to the expected place. Is there a better way?

Cheers
~ Andreas



tools.jar is included with a JDK, but not with a JRE. Ant emits a warning if it can't find tools.jar, since it assumes that it eventually be asked to do java compilation which is performed using tools.jar. In our case, we don't ask Ant to do java compilation so the warning is innocuous. The warning could be avoided by either having a JDK first in the path, or by setting the environment variable JAVA_HOME to the JDK's root directory (likely C:\Programme\Java \jdk1.6.0_04).

Reply via email to