Use eclipse -- generate jar and produce javadoc

Source: Internet
Author: User
Use eclipse to generate a jar file (jar)
The program references other jar package under the project folder to create a new META-INF folder
The file content of manifest. mf is as large as follows:
Manifest-version: 1.0
Ant-version: Apache ant 1.6.2
Created-by: 1.5.0 _ 06-57 ("Apple Computer, Inc .")
Built-by: Hani
Main-class: COM. opensymphony. workflow. Designer. Launcher
Class-path: Looks. Jar forms. Jar syntax. Jar jgraph. Jar Foxtrot. Jar osworkflow-2.8.0.jar oscore-2.2.5.jarMain-Class: the class to run.
Class-path: package to be introduced
Use eclipse to export the JAR file, select
User existing manifest from Workspace
Manifest file:/project name/src/META-INF/manifest. MF ---------------------------------------------------------------
Use eclipse to generate a document (javadoc)
There are three main methods to generate a document (javadoc) using Eclipse:
1. Right-click the project list, select Export (export), select javadoc under Java in the Export (export) dialog box, and submit it to the next step.
Note the following two points in the javadoc generation dialog box:
Javadoc command: Select JDK bin/javadoc.exe.
Destination: The Path to save the generated document.
Click Finish to generate the document.
2. Select File> export from the menu ),
The remaining steps are the same as the first method.
3. Select the project for which you want to generate the document, and select from the menu,
Project-> Generate javadoc directly enters the javadoc generation dialog box. The remaining steps are the same as the first method in the javadoc generation dialog box. ---------------------------------------------------------------
Sometimes you want to use some. Jar files as a shared part of all projects, such as the log4j-1.2.13.jar, how to set to share. Every time you add an external JAR file by setting the project-parameter-library, you need to set it once to create a project, which is troublesome. Edit the default eclipse JRE package, add the jar package to be added by default, and set this JRE as the JRE used for eclipse default Project Creation.
Eclipse> WINDOW> preferences> JAVA> installed jres> edit the default JRE environment ----------------------------------------------------------------
To create a new JAR file in the workbench:
1. In the package explorer, You can optionally pre-select one or more java elements to export. (These will be automaticallyselected in the jar package specification Wizard Page, described in Step 4 .)
2. From the menu bar, select File> export.
3. Select JAR file, then click Next.
4. In the jar package specification page, select the resources that you want to export in the select the resources to exportfield.
5. Select the appropriate check box to specify whether you want to export generated class files and resources or export ource files and resources. Note: Selected resources are exported in both cases.
6. In the select the export destination field, either type or Click Browse to select a location for the JAR file.
7. Select or clear the compress the contents of the JAR file check box.
8. select or clear the overwrite existing files without warning check box. if you clear thischeck box, then you will beprompted to confirm the replacement of each file that will be overwritten. note: The overwrite option is applied when writingthe JAR file, the jar description, and the manifest file.
9. You have two options:
Click Finish to create the JAR file immediately.
Click Next to use the jar packaging options page to set advanced options, create a jar description, or change the defaultmanifest.
Note: you must press next to select the entry class, that is, the main class, in the screen at the last step. This must be set. Otherwise, the. jar package cannot run.
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.