Deploying SWT applications with Java Web start

Source: Internet
Author: User
Tags abstract java web

Develop a very nice client-side Java application

Introduction: In the past few months, the Standard widget Toolbox (Standard widget Toolkit, SWT) has been making progress and drawing on the collective wisdom of more and more Java developers. At some stage in the SWT application development process-typically after the basic prototype is operational-developers begin to focus on the deployment process. Unlike traditional Java applications, SWT applications need to mount some operating system-specific libraries before the application runs. Although the ongoing deployment and maintenance of these libraries may seem like a headache, there is a solution to this problem, which is Sun's Java Web Start. The combination of SWT and Java Web Start provides developers with powerful tools to deploy very beautiful client-side Java applications.

SWT Overview

It is most appropriate now to introduce the Standard widget Toolbox (SWT) into the development community. Although the Sun's Java base class (Java Foundation CLASSES,JFC) has so far been able to satisfy developers of client-side applications, there are still many developers who are unwilling to use SWT for a variety of reasons. For many developers and architects, the dream of being able to develop client-side Java applications that visualize, manipulate, and execute visually, as with traditional native desktop applications, seems remote.

However, in the 2001 years, the Eclipse project suddenly appeared in this development "vision". Initially, the Eclipse project was thought to be a Java open source integrated development environment (IDE), but the project involved a broader scope. The SWT Toolbox was born during the development of Eclipse. The SWT Toolbox is similar to the JFC and its "Cousins" abstract window Toolbox (abstract window Toolkit, AWT), which provides developers with a set of widget widgets. However, the main difference between SWT and other toolkits is that SWT uses the underlying GUI window widget of the operating system. This approach provides Java developers with Cross-platform APIs to implement the "appearance" as a solution to native desktop applications.

Java Web Start Overview

Without these appropriate tools, the deployment and maintenance of traditional desktop applications can be a major headache for developers, regardless of language. Even the most effective support department, the idea of releasing a new version of the software must be checked to update each workstation, but also make them feel headache. To facilitate the distribution and maintenance needs of Java developers, Sun Microsystems introduced Java Web Start a few years ago. This technology simplifies deployment, maintenance, and updating of Java applications on end user workstations to a large extent.

Using a Web browser as the initial tool for starting an application, Java Web Start is a locally installed Help application that is included in the Sun's Java runtime environment. Whenever a user accesses the Java Network Boot Protocol (Java Network launching PROTOCOL,JNLP) file, the application is automatically downloaded to the user's workstation, and the application starts running. The entire process requires little interaction with end users, which greatly simplifies the distribution of applications.

File Viewer Application

Before we know how to deploy the implementation details of an SWT application with Java Web start, let's take a look at the application that will be deployed. This application that this article contains is a sample application provided by the Eclipse project. As shown in Figure 1, the application is a simple Cross-platform file viewer that enables users to browse through files and folders on their hard disks.

Figure 1. File Viewer running on Windows XP

To demonstrate the cross-platform capabilities of SWT and Java Web Start, this self-contained sample application has been packaged to run on Microsoft Windows and Red Hat Linux.

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.