Eclipse exports executable jar packages

Source: Internet
Author: User

Sometimes you need to export the Java project so that it can operate elsewhere, so you don't have to stick to the development feeling to run it.

The procedure is as follows:

Select project ----> right-click, export... ---> JAVA ---> runnable JAR File

For example:

Select the graph and finish it...

Tip: sometimes our project needs to be run at a remote address, and some basic configurations, such as the port, need to be modified instead of re-engineering every time, so it is quite troublesome. We need to export some configuration files separately, so that we only need to modify the configuration file ..

Practice: Create a configuration folder in the same directory as your project SRC, and copy it separately .. send the exported jar and the file together to the user. Tell me to put the jar and config folders in the same directory ..

Exported:

 

Run: cmd ---> go to the jar directory you want to run.

Example: Java-jar testhelloworld. Jar

I printed the following words: Hello world!

 

 

 

 

 

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.