This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ant not recognized...

 
Joey Doodle
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

This is my first time trying to run ant and I get the message that "ant is not recognized as an internal or external command"

I know this has to do with my environment variables, but I'm not sure what I'm missing. Ant is installed on a server called bfdevbuild. Listed below are my environment variables and their values.

Does anyone see what I'm missing?

Thanks,
Matt

ANT_HOME
\\bfdevbuild\tools\ant

PATH
\\bfdevbuild\tools\ant\bin\;%ANT_HOME%\bin;%JAVA_HOME%/jre/bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\NetManage\Windows;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\SQLLIB\BIN;C:\Program Files\SQLLIB\FUNCTION;C:\Program Files\SQLLIB\HELP;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;c:\j2sdk1.4.2_09\bin\

CLASSPATH
\\bfdevbuild\j2sdk1.4.2_09\lib\tools.jar;.;C:\Program Files\SQLLIB\java\db2java.zip;C:\Program Files\SQLLIB\java\runtime.zip;C:\Program Files\SQLLIB\java\sqlj.zip;C:\Program Files\SQLLIB\bin;C:\Program Files\Java\j2re1.4.2_09\lib\ext\QTJava.zip

JAVA_HOME
\\bfdevbuild\j2sdk1.4.2_09\
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

The thing that's relevant to that message is the PATH, and that looks fine, if[/if] there's a file named \\bfdevbuild\tools\ant\bin\ant.bat accessible from your system. If there isn't, then find where ant.bat really is, and change the PATH to point to its exact directory.

If it [i]is
there, then perhaps you just need to close your terminal window and open a new one so it picks up these new environment variables.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic