Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Building ant environment under Windows

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

First, install ant

Go to the official home page http://ant.apache.org to download the new version of ant (currently Ant1.8.1) and get a compressed package of apache-ant-1.8.1-bin.zip. Extract it to your hard drive, for example: C:\ apache-ant-1.8.1.

Second, configure environment variables

Set the ant environment variable in window:

ANT_HOME C:/ apache-ant-1.8.1

Path C:/ apache-ant-1.8.1/bin

Classpath C:/apache-ant-1.8.1/lib

Note: [

Configure environment variables: my computer-properties-advanced-environment variables

Such as: ANT_HOME:C:\ apache-ant-1.8.1

PATH:%ANT_HOME%\ bin (for convenience in dos environment)

The experiment always fails, and there is no way to change it to the address Carex / apache-ant-1.8.1/bin instead of using variables. It worked.

]

Third, verify ant

To verify that ant is installed successfully, do the following:

Select: start-> run-> cmd, and enter the following command: ant

If the following appears, the installation is successful:

Buildfile: build.xml does not exist!

Build failed

[this indicates that ant is installed successfully! Because ant runs the build.xml file by default, this file needs to be created. ]

View version: ant-version

However, if the following appears, the installation failed: (you can repeat the previous steps until the installation is successful. )

'ant' is not an internal or external command, nor is it a runnable program or batch file.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report