How to introduce another project to an existing project

Source: Internet
Author: User

Eclipse:

Introduction to Eclipse 2 Project: @ A project is introduced in the form of a jar (right-click Project-"Export-" general-"archive file-" As long as the Webroot under the Web-inf under the classes of the source file compiled class to select all, Because I introduced the project only want to use some of the project's classes, so I hit the jar package only the project after the compilation of all source files corresponding to the class class to hit jar, such as source files and resource files do not need to play) Note: This is not the same as really hit jar, this just hit me to call the class file, Instead of right-clicking the project export, select the jar file that is actually executable in Java (this way you need to map the mapped table to the entity class when mapping some of the underlying tables) This class can be found in the Mspersistence.xml file when the game is started to load the underlying data, otherwise the underlying data is not mapped.

@ A project is introduced as a source file (right-click Project-"Build path-" link source)-The first box selects the source file to be introduced into the project (since the introduction of the project is only to use some of the existing classes in the project, do not need the project's configuration file, etc.), So only select to the source file root of the project can be Tkcard Java directory, the bottom box for the introduction of the project to the individual name, so that the introduction of success will be generated in the project structure of the alias directory, the source file followed by the path as the introduction of the following path such as the Java directory above (This direct introduction to the source file, eventually these source files will also be compiled into the output directory in the way that the underlying data mapping does not need to be in the Mspersistence.xml file, as long as the mapping to identify which packages or classes to scan. )

INTELLJ:

INTELLJ introduction of the project is very simple, its principle is similar to the second way to directly introduce the source file, the introduction of the way:

First go to Project structure window, go to modules-"dependencies-" click the Plus-"module dependency-" Select the project root directory (typically the project name) to be introduced, Note: Sometimes because some of the classes introduced into the project require some jar packages that are not in their own project jar, it is common to introduce the project's jar package as libraries, and then delete some of the duplicate jar packages.

How to introduce another project to an existing project

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.