Myeclipse/eclipse Exporting The Jar method

Source: Internet
Author: User

Let's start by figuring out whether the Java project relies on third-party jars, followed by the kind of software, but myeclipse/eclipse both methods are the same. First: Java projects have dependencies on third-party jar packages
  1. 1

    The first step, select the item right click, select >>export

  2. 2

    Second step, search the jar in the input box, select >> Runnable jar file, click >> Next

  3. 3

    The third step,

    Launch configuration (Program entry config)

    Exportdestination (export target)

    Library handing:

    Selecting the first referenced jar package will be integrated into the project.

    Selecting the second referenced jar package is placed separately under the project root directory (recommended).

    Select the third referenced jar package will be placed in a separate folder, this folder and exported jar in the same directory,

    Finish can

  4. 4

    Fourth step: The end will pop up this interface, click OK

  5. 5

    Question:

    Why export-->runnable Jar file's launch configuration has nothing to choose from?

    Answer:

    MyEclipse export-->runnable jar file--> of the launch configuration there is no choice, in fact, you want to package into a jar file of the project's main method to run once, For example, the main method in Class A, run a once. So easy!!

    END
Second: Java projects are not dependent on third-party jar packages
  1. First step: Select Project Right-click to open selection >> export

  2. Second step: Search the jar, select the Jar file

  3. Step Three:

    Select the resources to export you can choose the project folder you want to include, some unnecessary folders do not need to put in, so as not to increase the space;

    Here are a few options:

    * Export generated class files and resources means that only the generated. class file and other resource files are exported,

    * Export all output folders for checked projects means all folders for the selected item are exported.

    * Export Java source file and resouces means the exported jar package will contain your source code *.java, if you do not want to leak the source, then do not choose this,

    * Export refactorings for checked projects contains some of the refactoring information files.

    Select the path to the exported jar in the Select the export destination, Next.

  4. Fourth step: The next page can choose whether to export those *.class files that contain warning warning or error errors. Generally, don't worry about him, Next.

  5. Fifth Step:

    The next page can be configured for the project. (If the project does not introduce a third-party jar package, this is the system default option for Ok,main class to be set to be the Main method entry class for your project).

    * Generate The manifest file is the system to help us automatically generate MANIFEST.MF files, if your project does not reference other Class-path, then you can choose this.

    * Use existing mainfest from workspace. This is optional and we can customize it. MF file, formatted as above.

    * Seal content. To encapsulate the entire jar or the specified package packet

    * Main class. Here you can choose your program portal, the future packaging of the jar is your entry class execution results.

    Final finish, done.

  6. Sixth step: The end will pop up this interface, click OK

Statement: Refer to Baidu experience and combined with the actual situation, the method is feasible!

Myeclipse/eclipse Exporting The Jar method

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.