Ant configuration and unable to locate tools. jar in Windows

Source: Internet
Author: User

From: http://blog.csdn.net/zygsee/article/details/4457701

If ant is installed for half a day in the evening, it is not configured. Experience:

1. Install and deploy the Configuration:
(1) download: Apache ant http://ant.apache.org/bindownload.cgi
(2) configuration: for example, JDK is installed in C:/JDK; ant is installed in C:/ant.
Set environment variables:
Java_home: C:/JDK
Ant_home: C:/ant
Path: % PATH %; % java_home %; % ant_home %
(3) test: Open CMD and enter ant-version to display properly.

2. Unable to locate tools. Jar
I have never set java_home before. Generally, it is written directly to the path in full path. Enter ant to prompt "unable to locate tools. Jar ".
Later, I set it to jdk_home ant_home and enter ant !! Dizzy

In notepad, open "ant. Bat" and check that it is retrieved from java_home. The change of "jdk_home" to "java_home" is successful !!

3. Small solution: it seems that some plug-ins still need to set the java_home variable. Using the full path is still unreliable !!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.