• No results found

User Interface History

N/A
N/A
Protected

Academic year: 2021

Share "User Interface History"

Copied!
13
0
0

Loading.... (view fulltext now)

Full text

(1)

Deploying Java Clients with Java™ Web Start (JWS)

Christopher M. Judd

President/Consultant

Judd Solutions, LLC.

User Interface History

1980

1970 1990 2000

Terminal Client/Server Web (DisconnectedMobile Clients)

(2)

© 2004 Judd Solutions, LLC. All rights reserved.

Client Deployment Options • HTML

• Applets

• Third party tools • Enterprise

• Proprietary • Open Source • Java Web Start

Java Web Start (JWS)

• Reference implementation of JNLP

– JavaTM Network Launching Protocol & API (JNLP)

• Java clients (Swing, AWT, SWT)

• Single click deployment

• Cross platform

• Application Manager

• Works with any browser

• Integrated with JRE

(3)

© 2004 Judd Solutions, LLC. All rights reserved.

Java Launch Network Protocol (JNLP)

• Application launch and deployment

technology

• Secure (sandbox)

• Client based (Swing, AWT, SWT)

• JNLP API

JWS Features

• Multiple JREs

• Security

– Code-signing – Sandboxing

• Versioning and incremental updates

• Desktop integration

• Offline operation

(4)

© 2004 Judd Solutions, LLC. All rights reserved.

Installation

http://localhost:8080/sdc.jnlp

Users Computer Web Server

sdc.jnlp sdcClient.jar 1.0 sdcReport.jar 1.0 JavaSoft.com JDK sdc.jnlp JDK sdcClient.jar 1.0 sdcReport.jar 1.0 Launching Methods

• HTML Link

– Installation

• Application Manager

• Shortcut

(5)

© 2004 Judd Solutions, LLC. All rights reserved.

Updating

Users Computer Web Server

sdc.jnlp sdcClient.jar 2.0 sdcReport.jar 1.0 sdc.jnlp JDK sdcClient.jar 1.0 sdcReport.jar 1.0 sdcClient.jar 2.0 sdcReport.jar 1.0 sdc.jnlp sdcClient.jar 1.0 sdcReport.jar 1.0 Application Manager

• Launch

Applications

• Add shortcuts

• Configuration

– Proxy – Manage JREs – Cache

(6)

© 2004 Judd Solutions, LLC. All rights reserved.

*.jnlp

• Configuration file

• XML format

• application/x-java-jnlp-file

• Windows associates it with JWS

JNLP Example <?xml version="1.0" encoding="UTF-8"?> <jnlp codebase=“http://localhost:8080" href="sdc.jnlp"> <information> <title>Application Name</title> <vendor>Company Name</vendor> <icon href="images/image.gif"/> <homepage href="index.html"/> <description>Application Description</description> <offline-allowed/> </information> <resources> <j2se version="1.4+"/> <jar href="sdcClient.jar"/> <jar href="sdcReport.jar"/> </resources> <application-desc main-class="com.sdc.store.ui.MercuryClient"/> </jnlp>

(7)

© 2004 Judd Solutions, LLC. All rights reserved.

Setup

• Install Java Web Start on all clients

– Now comes with JRE and JDK

• Add jnlp mime-type to web server

– application/x-java-jnlp-file

• jar application

• Create web page with link to jnlp file

• Deploy jars, web page and jnlp file to web server

• Tip for loading resources

– ClassLoader.getResourceAsStream

Security

• Default (sandbox)

– Untrusted

– Limited access to network – Limited access to file system

• Override

– Trusted

– Digitally sign code – Users discretion

(8)

© 2004 Judd Solutions, LLC. All rights reserved.

Digitally signing code

• Generate a Key using keytool

– Included in the JDK

– http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.h tml

• Ant Task to sign

<signjar jar=“application.jar" alias="sdc"

keystore="${keystore}" storepass="${key.pass}"/>

JNLP Developer’s Pack

• Separate Download (See Resources)

• Contains

– Developer’s Guide

– JNLP Servlet and Servlet Guide – JNLP API (javax.jnlp.*)

– Jar diff tool

– JavaScript for detecting and installing JWS

(9)

© 2004 Judd Solutions, LLC. All rights reserved.

JNLP API

• javax.jnlp.*

• Sandbox

• Services

– BasicService – Access to codebase

– ClipboardService – Set and get clipboard contents

– DownloadService – Control resources and cache

– ExtensionInstallerService – Interact with JNLP Client

– PersistanceService – Store and retrieve local data JNLP Servlet <servlet> <servlet-name>JnlpDownloadServlet</servlet-name> <servlet-class>com.sun.javaws.servlet.JnlpDownloadServlet</servlet-class> </servlet> Servlet Configuration

<jnlp codebase="$$codebase" href=“$$name"> …

</jnlp>

<jnlp codebase=“http://localhost:8080" href=“sdc.jnlp"> …

</jnlp>

Without JNLP Servlet

(10)

© 2004 Judd Solutions, LLC. All rights reserved.

e-Lube

Open Source JNLP Clients

• Netx

– http://www.acm.vt.edu/~jmaxwell/netx/netxPa ge.html

• OpenJNLP

(11)

© 2004 Judd Solutions, LLC. All rights reserved.

Testing Toolkit • Apollo

– http://ajax.sourceforge.net/apollo/

Conclusion

JWS and JNLP are a simple, secure and

standards based way of distributing

client application over the network.

(12)

© 2004 Judd Solutions, LLC. All rights reserved.

Resources

• Java Web Start and JNLP

– http://java.sun.com/products/javawebstart/

• JNLP Developer’s Pack

– http://java.sun.com/products/javawebstart/developers.ht ml

• JNLP API

– http://java.sun.com/j2se/1.4.2/docs/guide/jws/jnlp/index. html Contact Information

http://www.juddsolutions.com

[email protected]

• Blog

– http://blogs.apress.com/authors.php?author=Christopher%20Jud d

• Enterprise Java Development on a

Budget

(13)

© 2004 Judd Solutions, LLC. All rights reserved.

Questions ?

References

Related documents

de Klerk, South Africa’s last leader under the apartheid regime, Mandela found a negotiation partner who shared his vision of a peaceful transition and showed the courage to

This is the recurring motto of the unedited treatise Diez privilegios para mujeres preñadas 4 (Ten Privileges for Pregnant Women), written in 1606 by the Spanish physician

Make measurements on timeslot 0 [FREQUENCY] {Timeslot Off} [Enter] Activate the ORFS measurement (figure 25) [MEASURE] {GMSK Output RF The default setting measures spectrum

toda: Dorylaimida ) from the rhizosphere of the wild growing grape ( Vitis vinifera ssp. silvestris ) in the riparian woods of the rivers Danube and March

The calculated values of V can now be compared to the measured values defined in Table 1 at the specific time the measurements are available, considering the calculated values

[3] NEST’s primary goals are to read in ESA and third part SAR data products, provide tools for calibration, orthorectification, co-registration, interferometry,

This paper proposes a logical model to examine the effect of the EDoS attack in cloud environment using finite queuing model and enhanced with experimental model. Due to