12.07.2015 Views

OsmWv

OsmWv

OsmWv

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

package, jars and deployment,,.LOOk at the sequence of events below,and 2.pIacethem in the order In which theyoccur In a JWS application.3.__-~--:::;':::-;;;-v!heWeb server sends a JAR\he Web browser starts uptheJWS helper appthe Web server sendstiJe to the browseruser dicks a Web page Itnlileto!he JWS helper apper requests a .jnlpfilefrom the Web serverthe JWS helper app invokesthe JAR's malnO method4.5,6.7.dlim~estJonsQ.: How IsJava Web Start dl~rentfrom an applet1A:Applets can't live outside of a Web browser. An applet isdownloaded from the Web as part of a Web page rather thansimply from a Web page. In other words, to the browser, the appletIsJust like a JPEG or any other resource. The browser uses either aJava plug-In or the browser's own built-In Java (far less commontoday) to run the applet. Applets don't have the same level offunctionality for things such as automatic updating, and they mustalways be launched from the browser. With JWS applications, oncethey're downloaded from the Web, the user doesn't even have tobe usIng a browser to relaunch the application locally. Instead,the user can start up the JWS helper app, and use It to launch thealready-downloaded application again.Q..: What are the security restrictions of JWS1A: JWS apps have several limitations Including beingrestricted from reading and writing to the user's hard drive. But...JWS has Its own API with a special open and savedialog box sothat, with the user's permission, your app can save and read Itsown flies In a speclaI, restricted area of th e user's drive.,--BULlO POINTS ­•Java Web Start technology lets you deploy astand-alone client application from the Web.• Java Web Start includes a 'helper app' that mustbe installed on the client (along with Java).•AJava Web Start (JWS) app has two pieces:an executable JAR and a .jnlp file.• A.jnlp file isa simple XML document thatdescribes your JWS application. It includestags for specifying the name and location oftheJAR, and the name ofthe class with the mainOmethod.• When a browser gets a .jnlp file from the server(because the user clicked on a link tothe .jnlpfile), the browser starts upthe JWS helper app.•The JWS helper app reads the .jnlp file andrequests the executable JAR from the Webserver.• When the JWS gets the JAR, it invokes themainO method (specified in the .jnlp file).you are he re ~ 601

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!