Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 709277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:29:10+00:00 2026-05-14T04:29:10+00:00

I am installing ant on a Windows XP machine, and am following the instructions

  • 0

I am installing ant on a Windows XP machine, and am following the instructions at Apache’s manual site. It said to set JAVA_HOME, so I checked, saw there was no environment variable named JAVA_HOME, made one, and set it to “C:\Program Files\Java\jdk1.6.0_19”

When I try to run ant debug, however, it tells me that JAVA_HOME is currently set to “C:\Program Files\Java\jre6”

I’m guessing JAVA_HOME isn’t an environment variable. But if it isn’t one, I’m at a loss as to where to start looking for it. Anybody know?

Edit: Oh yeah – it’s bugging me for tools.jar as well, but I’m guessing that when I fix the JAVA_HOME issue, that will help the terminal find tools.jar as well. Or maybe I’m wrong. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:29:10+00:00Added an answer on May 14, 2026 at 4:29 am

    Following on Newtopian’s suggestions, you can quickly confirm if that behavior is the problem by running in the terminal

    C:\>set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_19
    C:\>ant debug
    

    Also, I’m not sure if the text you entered into the JAVA_HOME environment variable is literally “C:\Program Files\Java\jdk1.6.0_19”, i.e., with quotes, but if so, you should remove the quote marks as they’ll throw off ant.bat.

    Here’s the relevant bit from ant.bat

    :checkJava
    set _JAVACMD=%JAVACMD%
    
    if "%JAVA_HOME%" == "" goto noJavaHome
    if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
    if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
    goto checkJikes
    
    :noJavaHome
    if "%_JAVACMD%" == "" set _JAVACMD=java.exe
    
    ... omitted ...
    
    "%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
    

    If that doesn’t help, could you post your debug task?


    Two options to make it permanent:

    1. Run this:

      C:\>REG delete HKCU\Environment /V JAVA_HOME
      C:\>REG delete HKLM\Environment /V JAVA_HOME
      C:\>REG add HKCU\Environment /V JAVA_HOME /d "C:\Program Files\Java\jdk1.6.0_19"

    (basically, ensure you only have one JAVA_HOME set and it’s correct; be sure to close and reopen the terminal after doing this)

    1. If all else fails, the crappy batch file solution:

      @echo off
      set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_19
      ant %*

    save as ant_wrapper.bat (or whatever) and you should be able to do ant_wrapper debug.

    (Both of these solutions are untested)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When installing Windows SDK v6.1, following the chromium instructions ( http://dev.chromium.org/developers/how-tos/build-instructions-windows ) I run
Having trouble installing play! on windows. Following the installation guide on: http://www.playframework.org/documentation/1.2.4/install After installing
Installing the petstore from the command line using ant Here are the instructions for
When installing Selenium using the following command line: pip install -U selenium I get
When installing packages in Python using pip, I came across the following error: unable
I made a project and when I run ant install I get the following:
Installing roundcube webmail: I have the DB set up (win serv 2008, MS SQL
Installing my software on Windows XP was always easy. Everything went in the c:\Program
After installing VMware Server I get the following error when I try to access
I imagine there are two options: Build a parallel ANT script and bypass the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.