Generate EXE, executable jar, and exe with shell window in JBuilder

Source: Internet
Author: User

The following figure is taken from jbuilder9, which is similar to version 7, 8, 9, X, and 200X.

Click the winzards menu and select the native executable builder menu item;

 

Next, go to native executable builder wizards, in seven steps:

Step 1: for example, name your executable program in the Name field. The default name is native.
Executable, file is to fill in the name of the jar to be generated and select the storage location, compress the content
Archive indicates whether to compress the content in the jar file. The following checkbox indicates whether to generate the JAR file during the build project;

 

Step 2: select the packages, classes, and resource files to be packaged into the jar, and include class
Dependencies indicates whether to include the dependent classes in the jar package (for example, when you use a third-party Library and other classes introduced in non-Java core libraries). Click "add
Filters... "can specify the included packages and classes, and click" add files... "to add the resource files to be included.

 

Click "Add filter..." and the "add filters" window appears, for example:

 

Here we mainly use custom filters to determine which classes are included. There are two forms of filters: Include (included) and exclude (excluded ). You can directly
Package package can also be directly used for the class. Generally, you can select the main class that contains the main method, provided that the main class contains the dependency class is selected in the previous graph.
Checkbox.

Add files is simple. Simply add files, such as images and configuration files required by your program.

Step 3: Determine how to process the dependent database. The list in the figure below lists the libraries you have introduced in this project.

The preceding four processing methods for each database are listed in order:

1. Never contain any class or resource;

2. include necessary classes and known resources;

3. Including necessary classes and all resources;

4. It always contains all classes and resources;

The default option is the first option for each database. Sometimes the class error cannot be found in the EXE you created. This may be because it is not set here.

 

Step 4: Set the manifest (package list) project of the JAR file. The default value is include and one is automatically created. Generally, you can set it by default.

 

Step 5: select the method for determining the main class of the application.

You can specify either of the following methods: 1. Select a running configuration from the specified runtime configuration. runtime configuration is the option in the drop-down list:

 

2. Specify a primary class directly (that is, the class containing the main method ).

Step 6: select the executable program type to be generated. There are five types to choose from:

1. Window fui type;

2. Window EXE type with Console (that is, DOS window;

3. executable files in Linux;

4. executable programs under Solaris;

5. executable programs under Mac OS;

 

In this step, you can click Finish to generate it. Step 7 is optional.

Step 7: Set the configuration options during running. Generally, this step is not required. Advanced users may need it. You can refer to the above description for what to do with this step ^-^

 

Finish.

The following icon appears in the project file browser on the left side of JB. The name is the name you specified in Step 1:

 

Right-click the project and select make or rebuild.

Then an EXE file appears in your project directory.

One of the by-products of this process is that an executable JAR file is generated at the same time ^-^

Note: The EXE and common windows are generated here.
There are differences between EXE programs. You can right-click the EXE file and check the properties. It turns out to be a compressed file. However, this compressed file is a little different from a common compressed file, you can take a look at it and decompress it.
After shrinking the file, check ^-^. Obviously this is not a real EXE file, that is, the JRE environment is required.

If you want to generate a real EXE, you can use another tool, such as the jet-103-eval-win32.exe, which can compile the Java class into a 32-bit Windows Executable File Without JVM support. The download of this file jet-103-eval-win32.exe site has been, but now can not find this program.

You can also refer to this site http://www.wnetw.com/jclub/technology/read.jsp? Itemid = 226.
This connection uses eclipse and jsmooth to generate a Java EXE executable file. This method is probably the same as that generated by JB, not a Win32 exe program.

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.