Use exe4j to package Java programs and exe4j to package java

Source: Internet
Author: User

Use exe4j to package Java programs and exe4j to package java

Tools:

  • Exe4j software (cloud disk storage)
  • Jar packages of Java programs that can be run
  1. Open the exe4j software we have installed. First, we can see a welcome interface. We can directly [next;

  2. 2

    In step 2, select "JAR in EXE mode" and then "next ];

  3. In step 3, you need to enter the abbreviated name of the program and specify the output directory, that is, the directory for saving the program. We can set it according to our own situation, without special requirements, and then [next ];

  4. In step 4, we need to specify the program name and set the program icon. Note that the program icon should use an image in ico format;

  5. In the left-side Navigation Pane, select 32-bit or 64-bit and check Generate 64-bit executeable. Check this option to avoid unnecessary troubles. Then [next ];

  6. In step 5, we need to add our jar package, click the green "+" on the right, select Archive, open the browsing directory, and find our jar package, then select Open and OK ];

  7. We can see that our jar package has been added;

  8. Then select the Main class. After the Main class, select Browse, find our Main class, add the master class, and then click next ];

  9. In step 6, set the minimum and maximum versions of JRE. We can set it as needed. Set the minor version to 1.5 and the major version to 1.7;

  10. Click Advanced Options and select Search sequence to add our JRE to the software. In this way, our code can be run on a computer without a Java environment installed; click Add on the right, select Directory, and then click browse. Find Our JRE and add it;

  11. Click [Preferred VM] on the left, select [Client hotspot VM], and then [next ];

  12. The other steps are OK by default, so that the generated exe file can run normally!

     

    Error:

    Select a JDK version.

    Select a 32-bit JRE file. Otherwise, an error is returned.

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.