Usage and precautions of Java generation exe4j.exe (Java EXE maker)

Source: Internet
Author: User

1. register the software: license information to enter the registration code: L-g782dn2d-1f1yqxx1rv1sqd

2. Select "jar in EXE" mode.

3. General: enter your Appliaction name.

4. Out Directory: stores the location of the generated exe.

5. excutename: xxx.exe

6. classpath: add your jar files (the packages you use in your project, and all the Java packages applied in your project) and select the main method.

7. Minimum Version: x. x determines the version number for your exe.

8. maxmum version: Do not enter it. Otherwise, an inexplicable error will occur. Error: No JVM cocould be found on your system. Please define exe4j_java_home to point to an installed JDK or JRE or download a JRE from www.java.com

9. Next --> next finash. At this time, the EXE file you want to generate has been generated.

Note that if your project is a swing programming, you must use relative paths for all path problems:

For example, add an icon to the frame:

Image frame_icon = toolkit. getdefaulttoolkit (). createimage (getclass (). getresource ("/exit.gif "));
Frame. seticonimage (frame_icon );

For example, add an icon for menuitem:

Image inputicon = toolkit. getdefatooltoolkit (). createimage (getclass (). getresource ("/input.gif "));

Inputmenuitem. seticon (New imageicon (inputicon ));

In short, use the relative path.

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.