How Eclipse imports Java project files

Source: Internet
Author: User

You want to be able to import into eclipse when you normally download it to your project. However, some items cannot be imported directly and need to be converted.

Open the source file directory and query as follows:

If the directory contains a pom.xml file, the project is built by Maven, and refer to the following how to import a maven project.

If the directory contains a build.xml file, then the project was built by Ant, and refer to the following how to import the Ant project.

If the directory contains a. classpath. project file, then the project was developed by Eclipse and can be imported directly from Eclipse.

1. How to import MAVEN projects

1.1 First download Maven program, http://maven.apache.org/, find download in the homepage, click to enter.

1.2 In the second page according to different operating systems to select the corresponding compression package, I window System, select the second package, click to download.

1.3 Extract the downloaded compressed package to a directory as follows, in this case d:\tool\apache-maven-3.3.9\:

1.4 Add the Bin directory to the path path of the environment variable, in this case D:\tool\apache-maven-3.3.9\bin

1.5 Enter mvn-v in cmd command mode to view the current version, if it can be displayed, the installation is successful, such as.

1.6 The project to be imported is extracted to any directory, in this case the path is D:\tool\ECharts, as follows

1.7 Under the cmd command line, switch the path to D:\tool\ECharts, and then execute the MVN eclipse:eclipse command.

1.8 After the creation is successful, the current project has been converted to eclipse to import the project.

1.9 Back in the project folder that you just imported, you can see the new. Classpath. project file and the target folder.

1.10 Open Eclipse, select file->import->general->existing Projects into workspace, and then select the folder that you just imported.

2. How to import ant projects (to be supplemented later)

How Eclipse imports Java project files

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.