JSPWiki/Glassfish Install (Part 8 of 18: Install Apache Ant)

Locate the Apache Ant zip file you downloaded in Part 4. This file should be named “apache-ant-1.7.0-bin.zip.”

Decompress the archive…

  1. Right click on the file –> 7-zip –> Extract Files…
  2. You will now have a new folder with the name “apache-ant-1.7.0-bin”
  3. Double click on the “apache-ant-1.7.0-bin” folder to open it.
  4. You will see a folder named “apache-ant-1.7.0”
  5. Copy this inner folder to your C:\java folder

Now we need to set up the environment variables for ant:

  1. Right click on your “My Computer” icon and choose properties.
  2. Click the “Advanced Tab”
  3. Click the “Environment Variables” button
  4. Under the “System Variables” section of the window click “New”
  5. Enter the “Variable Name” — ANT_HOME
  6. Enter the “Variable Value” — C:\java\apache-ant-1.7.0
  7. Click OK.
  8. Under the “System Variables” find the system variable with then name “Path”
  9. Click “Edit”
  10. Add “;%ANT_HOME%\bin” to the very end of the “Variable Value” field
  11. Click OK.
  12. Click OK to close the “Environment Variables” window
  13. Click OK to close the “System Properties” window.

Note: We could have also setup a “CLASSPATH” environment variable but we’re going to leave that out for now. Just be aware of it in case you find, for some other project, that you have a need to alter or set your “CLASSPATH.”

Verify that you can run ant commands…

  1. Click on the “Start” Button
  2. Click on “Run…”
  3. In the “Open:” box enter “cmd” and click “OK”
  4. A command window will open
  5. Type “ant -version” in the command window
  6. You will get a response indicating that you are running “Apache Ant version 1.7.0 compiled on December 13 2006”

Consider Apache Ant installed!

Our “java” folder now looks like this:

C: java
\–apache-ant-1.7.0
\–jdk1.6.0
\–jre1.6.0

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s