Rookie shot--eclipse with Ant one of the two

Source: Internet
Author: User

1. Eclipse typically comes with ant functionality, but the ability to automatically generate ant scripts is more subtle and difficult to find:

(1) Right-click on the project to generate Build.xml->export->export.

(2) In the popup dialog box, select Ant Build in general and click Next.

(3) Select item Click Finish. A build.xml file is automatically generated in the project directory.

2. The following error occurred using the Ant build project:

BUILD FAILED

D:\workspace\demo\build.xml:62:unable to find a javac compiler;

Com.sun.tools.javac.Main isn't on the classpath.

Perhaps Java_home does not point to the JDK.

This is due to a problem with the JDK path used by eclipse, which binds the available JDK paths to eclipse. As follows:

(1) eclipse->windows->preference->java->installed jdk-> Click the Add button, then select the standard JVM in the Add JRE dialog box and click Next.

(2) JRE Home Select the correct JDK installation path, others remain default, click Finish.

(3) Go back to the Preference dialog box and select the JDK you just added, click OK.

At this point, the rebuild succeeds.

Build

:

BUILD Successful

Total time:421 milliseconds.

Rookie shot--eclipse with Ant one of the two

Related Article

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.