Look at the error. Your environment variable is pointing at C:\>echo %JAVA_HOME% C:\Program Files\j2sdk1.4.2_04
But the error is saying that it expects it in C:\Program Files\Java\j2re1.4.2_04\lib\tools.jar The question is why is it expecting it in a different directory? i.e. C:\Program Files\Java instead of C:\Program Files\ Maybe you have JAVA_HOME that points to defined somewhere in the scripts? On Tue, Jan 19, 2010 at 7:03 AM, Knuplesch, Juergen < juergen.knuple...@icongmbh.de> wrote: > Hello, > > What is your question? > > I always put JAVA_HOME/bin into the path variable and then it works. > > Greetings Juergen > > > -- > Jürgen Knuplesch > -----Ursprüngliche Nachricht----- > Von: "Stephan Müller" [mailto:stephanr.muel...@gmx.de] > Gesendet: Dienstag, 19. Januar 2010 00:07 > An: user@ant.apache.org > Betreff: JAVA_HOME not interpreted on XP > > Hi list. > > I've run into the well known > "Unable to locate tools.jar." > System is XP SP3. > Tested with ant-1.8.0RC1 and > ant-1.6.5. > Installed Java Runtime Plugin > 1.4.2_04 and JDK 1.4.2_04 > > here're some snippets > ***************************** > C:\>echo %JAVA_HOME% > C:\Program Files\j2sdk1.4.2_04 > ***************************** > C:\>dir "%JAVA_HOME%"\lib > Datenträger in Laufwerk C: ist WINDOWS > Volumeseriennummer: F4DF-4BF0 > > Verzeichnis von C:\Program Files\j2sdk1.4.2_04\lib > > 18.01.2010 22:57 <DIR> . > 18.01.2010 22:57 <DIR> .. > 22.02.2004 23:34 139.037 dt.jar > 22.02.2004 23:44 1.214.157 htmlconverter.jar > 19.05.2005 12:29 18.381 ir.idl > 22.02.2004 23:29 1.916 jawt.lib > 22.02.2004 23:29 218.250 jvm.lib > 19.05.2005 12:29 429 orb.idl > 22.02.2004 23:48 5.082.203 tools.jar > ****************************** > Error message when running ant: > C:\>ant > Unable to locate tools.jar. Expected to find it in C:\Program > Files\Java\j2re1.4.2_04\lib\tools.jar > ****************************** > > I've also tried to use the 8.3 style for the variable name, still no luck. > > > See ugly-cut "ant -diagnostics" below. > Regards, > Stephan > > > C:\PROGRA~1\J2SDK1~1.2_0>ant -diagnostics Unable to locate tools.jar. > Expected to find it in C:\Program Files\Java\j2re1.4.2_04\li > ------- Ant diagnostics report ------- > Apache Ant version 1.6.5 compiled on June 2 2005 > > ------------------------------------------- > Implementation Version (JDK1.2+ only) > ------------------------------------------- > core tasks : 1.6.5 > optional tasks : 1.6.5 > > ------------------------------------------- > ANT_HOME/lib jar listing > ------------------------------------------- > ant.home: C:\Documents and Settings\Stephan.Mueller\My > Documents\downloads\apache-ant-1. > ant-antlr.jar (5667 bytes) > ant-apache-bcel.jar (8617 bytes) > ant-apache-bsf.jar (12597 bytes) > ant-apache-log4j.jar (3022 bytes) > ant-apache-oro.jar (48034 bytes) > ant-apache-regexp.jar (3724 bytes) > ant-apache-resolver.jar (4082 bytes) > ant-commons-logging.jar (3864 bytes) > ant-commons-net.jar (35303 bytes) > ant-icontract.jar (9721 bytes) > ant-jai.jar (21359 bytes) > ant-javamail.jar (6761 bytes) > ant-jdepend.jar (8160 bytes) > ant-jmf.jar (6605 bytes) > ant-jsch.jar (22726 bytes) > ant-junit.jar (74237 bytes) > ant-launcher.jar (9180 bytes) > ant-netrexx.jar (9998 bytes) > ant-nodeps.jar (421008 bytes) > ant-starteam.jar (35472 bytes) > ant-stylebook.jar (2328 bytes) > ant-swing.jar (6763 bytes) > ant-trax.jar (68841 bytes) > ant-vaj.jar (49742 bytes) > ant-weblogic.jar (14363 bytes) > ant-xalan1.jar (4465 bytes) > ant-xslp.jar (2244 bytes) > ant.jar (1034049 bytes) > xercesImpl.jar (1010675 bytes) > xml-apis.jar (124724 bytes) > > ------------------------------------------- > Tasks availability > ------------------------------------------- > image : Missing dependency com.sun.media.jai.codec.FileSeekableStream > sshexec : Missing dependency com.jcraft.jsch.UserInfo scp : Missing > dependency com.jcraft.jsch.UserInfo jdepend : Missing dependency > jdepend.xmlui.JDepend junit : Missing dependency junit.framework.Test > > ------------------------------------------- > org.apache.env.Which diagnostics > ------------------------------------------- > Not available. > Download it at http://xml.apache.org/commons/ > > ------------------------------------------- > XML Parser information > ------------------------------------------- > XML Parser : org.apache.xerces.jaxp.SAXParserImpl > XML Parser Location: C:\Documents and Settings\Stephan.Mueller\My > Documents\downloads\ap > > ------------------------------------------- > System properties > ------------------------------------------- > java.runtime.name : Java(TM) 2 Runtime Environment, Standard Edition > sun.boot.library.path : C:\Program Files\Java\j2re1.4.2_04\bin > java.vm.version : 1.4.2_04-b05 ant.library.dir : C:\Documents and > Settings\Stephan.Mueller\My Documents\downloads\apach java.vm.vendor : Sun > Microsystems Inc. > java.vendor.url : http://java.sun.com/ > path.separator : ; > java.vm.name : Java HotSpot(TM) Client VM file.encoding.pkg : > sun.iouser.country : DE sun.os.patch.level : Service Pack 2 > java.vm.specification.name : Java Virtual Machine Specification user.dir : > C:\PROGRA~1\J2SDK1~1.2_0 java.runtime.version : 1.4.2_04-b05 > java.awt.graphicsenv : sun.awt.Win32GraphicsEnvironment java.endorsed.dirs : > C:\Program Files\Java\j2re1.4.2_04\lib\endorsed > os.arch : x86 > java.io.tmpdir : C:\DOCUME~1\STEPHA~1.MUE\LOCALS~1\Temp\ > line.separator : > > java.vm.specification.vendor : Sun Microsystems Inc. > user.variant : > os.name : Windows XP > ant.home : C:\Documents and Settings\Stephan.Mueller\My > Documents\downloads\apache-ant-1 sun.java2d.fontpath : > java.library.path : > C:\PROGRA~1\J2SDK1~1.2_0\bin;.;C:\windows\system32;C:\windows;C:\Pro > Solutions\UltraEdit-32\;C:\Program Files\QuickTime\QTSystem\;C:\Documents > and Settings\S java.specification.name : Java Platform API Specification > java.class.version : 48.0 java.util.prefs.PreferencesFactory : > java.util.prefs.WindowsPreferencesFactory > os.version : 5.1 > user.home : C:\Documents and Settings\Stephan.Mueller user.timezone : > Europe/Belgrade java.awt.printerjob : sun.awt.windows.WPrinterJob > file.encoding : Cp1252 java.specification.version : 1.4 user.name : > Stephan.Mueller java.class.path : C:\Documents and > Settings\Stephan.Mueller\My Documents\downloads\apach ephan.Mueller\My > Documents\downloads\apache-ant-1.6.5\lib\ant-apache-log4j.jar;C:\Docume > nloads\apache-ant-1.6.5\lib\ant-commons-logging.jar;C:\Documents and > Settings\Stephan.Mu ar;C:\Documents and Settings\Stephan.Mueller\My > Documents\downloads\apache-ant-1.6.5\lib > nloads\apache-ant-1.6.5\lib\ant-launcher.jar;C:\Documents and > Settings\Stephan.Mueller\M cuments and Settings\Stephan.Mueller\My > Documents\downloads\apache-ant-1.6.5\lib\ant-swi > apache-ant-1.6.5\lib\ant-xalan1.jar;C:\Documents and > Settings\Stephan.Mueller\My Documen java.vm.specification.version : 1.0 > sun.arch.data.model : 32 java.home : C:\Program Files\Java\j2re1.4.2_04 > java.specification.vendor : Sun Microsystems Inc. > user.language : de > awt.toolkit : sun.awt.windows.WToolkit > java.vm.info : mixed mode > java.version : 1.4.2_04 > java.ext.dirs : C:\Program Files\Java\j2re1.4.2_04\lib\ext > sun.boot.class.path : C:\Program > Files\Java\j2re1.4.2_04\lib\rt.jar;C:\Program Files\Jav java.vendor : Sun > Microsystems Inc. > file.separator : \ > java.vendor.url.bug : http://java.sun.com/cgi-bin/bugreport.cgi > sun.cpu.endian : little > sun.io.unicode.encoding : UnicodeLittle > sun.cpu.isalist : pentium i486 i386 > > -- > Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 > - sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional > commands, e-mail: user-h...@ant.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > For additional commands, e-mail: user-h...@ant.apache.org > >