10 deployment of applications and applets

Source: Internet
Author: User

Skip the "Swing" user interface components

JAR file

When the application is packaged, the user must want to provide only a single file, rather than a directory containing a large number of class files, which are designed for this purpose. A JAR file can contain either class files or other types of files such as images and sounds. In addition, the jar file is compressed, and it uses the familiar zip compression format.

Jar files can be made using the Jar tool (in the default JDK installation, located in the Jdk/bin directory), and the Common command format is:

Jar CVF jarfilename File1 File2 ... (Note that this format is very similar to Linux tar)

Example: Jar CVF Calculatorclasses.jar *.class icon.gif

In addition to class files, images, and other resources, each jar file also contains a manifest file (manifest) that describes the characteristics of the archive, and the manifest file is named manifest. MF, which is located in a special Meta-inf subdirectory of the jar file.

The smallest standard-compliant manifest file is simple: manifest-version:1.0

To create a jar with a manifest file, jar cfm Myarchive.jar MANIFEST.MF com/mycompany/mypgk/*.class

To update an existing manifest file, jar UFM Myarchive.jar MANIFEST-ADDITIONS.MF

runnable jar Files

Jar Cvfe Myprogram.jar com.mycompany.mkpkg.MainAppClass files to add (that is, you need to add a parameter e when packaging)

Note: The last line of the manifest file must end with a newline character, otherwise the manifest file will not be read correctly.

Java Web Start

Java Web Start is a technology for publishing applications on the Internet. (The browser just implements a download platform, users need to click to download to the local, and then run, run and do not rely on the browser, but run independently, the digital signature of the application can be given access to the local machine arbitrary permissions, the path matching is correct, the download is automatic)

Here's just a quick look.

Applet

An applet is a Java application that is contained in an HTML Web page, and the HTML page must tell the browser which applet to load and where each applet is placed in the page.

<applet code= "Nothelloworldapplet.class" width= "height=" ></applet>

Requires a browser to install a plugin Java plug-in

Just to understand it.

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.