Use installanywhere7.1 to create the Java EXE installation package

Source: Internet
Author: User
For completed Java application development projects, it should be made safe and stable from the commercial point of view.
To ensure product security and enterprise benefits. The most efficient commercial and chemical products on the market
InstallShield, installanywhere, install4j, etc. Installshield is suitable
C, C ++, Delphi, Pb, VB, etc. The latter two are suitable for packaging and production of Java applications. The following uses installanywhere7.1 as an example to describe how
To create an installation package for a Java application. After the Java application project is developed and tested, enterprises need to archive the package (that is, the JAR file) and create a commercial installation program. JDK of each version provides the jar utility. The basic syntax is as follows: Jar <option string> [jar] [manifest file] [input files]Option string is used to specify the operations performed by the jar utility. Therefore, it must be specified (the parameters and usage methods are listed below ). C

Create a new or empty compression File


V

List Directory tables


X

Decompress all files


X file

Decompress the specified file


F

Indicates "I am going to provide you with a file name ". If this parameter is omitted,

Jar

It is assumed that its input comes from the standard input; or when it creates a file, the output enters the standard output.


M

It indicates that the first parameter will be the name of the detail table File Created by the user.


V

Produce Detailed output

Jar

Detailed description of the work done


O

Only save files; Do not compress files (used to create

Jar

File so that we can put it in our own class path)


M

Detail table file not automatically generated

,

It is not used in most cases.



The following is the call
Jar
Some typical methods:

Jar CF myjarfile. jar *. Class


Used to create
Myjarfile. Jar
Of
Jar
File, which contains all class files in the current directory, as well as automatically generated detail table files.

Jar CMF myjarfile. Jar mymanifestfile. MF *. Class


Similar to ingress, but
Mymanifestfile. MF
User-created detail table file.

Jar TF myjarfile. Jar


Generate
Myjarfile. Jar
A directory table of all files in.

Jar tvf myjarfile. Jar


Add
"Verbose"
(Detailed) logo, provided
Myjarfile. Jar
For more detailed information.

Jar CVF MyApp. Jar audio classes Image


Assume that
Audio
,
Classes
And
Image
Is a subdirectory, so that all subdirectories are merged to the file
MyApp. Jar
. Generally, third-party library files are used during Java application development, and installation packages are created.
It is best to separate self-developed libraries from third-party libraries. Therefore, before creating a jar file, write a mainfest file (the user-created detail form file with the suffix. MF ).
During the JAR file process, it is used to indicate a file that describes the relevant jar files using verification information (that is, the third-party jar library files used by the current project ).

Figure 1 manifest file writing if you use JBuilder (jbuilder2005) to develop a Java application project, you can generate the required JAR file through the interface: 1.


Open the project for which you want to create a jar file. Under the current project, in the object Gallery (open through file-) New), select archive-> application;


Figure 2 jbuilder2005 object Gallery

2.


Click OK to go to the parameter settings page:


Figure 3 jbuilder2005 archive builder Step 1

3.


Follow the prompts to fill in step by step and select the file to be packaged.


Figure 4 jbuilder2005 archive builder Step 2

4.


In step 3 of archive builder, if no third-party jar packages related to the project are added, select exclude all (if you use jbuilder2005 to create a single executable program, select include all ).


Figure 5 jbuilder2005 archive builder step 3

5.


Add the previously defined mainfest file or create it in Step 4:


Figure 6 jbuilder2005 archive builder Step 4

6.


For the remaining four steps, you can follow the prompts of archive builder. This is very simple and will not be described here. 7.


After compilation, you can obtain the corresponding JAR file.
Figure 7 after compiling the JAR file and creating the file (JAR file), open installanywhere7.1,
Create a new project and enter advanced designer (for simple Java applications, you can use the project
The steps below are all done in advanced designer.) Figure 8 installanywhere7.1 Enterprise Edition advanced designer

1. Basic installer information settings, such as information, description, File Settings, platform, region, rules, and so on. Generally, it can be understood and easily entered correctly.


2. Project

:
Defines the installation interface of the installer. Such as splash
Screen, background, frameui, and other intuitive interfaces. You can also add additional panels, such as license, password, and serial.
In the "Installer panel addition" and "Install progress
Panel. You can also define the flashing screen billboards during installation. You can also add installation help to provide users with necessary installation information.





Figure 9 Advanced designer installer UI




Installer UI
3.
:
Defines components to be installed for Java applications. You can set typical installation components (typical) or custom components, which are set in install sets, features, components, and modules.




Figure 10 Advanced designer Organization

Organization4.
:
This module mainly defines various execution actions when the installer is running, such as introduction, license agreement, serial
Number, choose folder, etc. Yes for install
The number and sequence of panels defined in the UI module must be consistent with those defined in install UI.


Figure 11 advanced designer pre-install



Pre-install5.
: Specify the file to be packaged. The path defined in this module is the internal path of the program installed on the local PC after the installation program is completed. You can use set classpath and add launcher to specify the program portal and add shortcuts to the program group.


Figure 12 advanced designer install

Install6.
: Defines the work after the program is installed, such as adding dynamic configurations, registry changes, and restarting the computer,For more advanced use, you can also

Action

Write scripts

For more information about script writing rules and variable parameters, see the installanywhere help documentation.


Figure 13 Advanced designer post-install




Post-Install7.
: Similar to pre-install, it defines the action before detaching, such as selecting the module to detach.



Figure 14 advanced designer pre-uninstall



Pre-uninstall8.
: Similar to post-install, operations after the uninstallation is completed, such as restarting the computer and adding related prompts.


Figure 15 advanced designer post-uninstall



Post-uninstall9.
: After defining all the modules above, you can select different platforms and Vm versions. You do not need VMS, trace logs, and MSI file generation. Finally, you can use installanywhere to generate the required installer.


Figure 16 advanced designer Builder

Build

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.