Meaningless Drivel is fun!*
The moose likes JNLP and Web Start and the fly likes Just what the heck is Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Just what the heck is "Web Start"?" Watch "Just what the heck is "Web Start"?" New topic
Author

Just what the heck is "Web Start"?

John M. Gabriele
Ranch Hand

Joined: Feb 18, 2001
Posts: 232
I'm just getting back into Java from a hiatus doing other sorts of computer work, and I'm aware of two ways to run Java programs. 1. Download and run a .jar file, and 2. as an applet (not used much anymore).

.jar files are double-clickable in Mac OS X, and I'm guessing you can also just download and double-click them in that other weird alternate "MS Windows" OS as well. In GNU/Linux you still usually have to run them "java -jar foo.jar" unless you set up your desktop environment to do something special with .jar files.

What is this "Web Start"? And why is it necessary? I just took a look at what I suppose is the beginning of the docs for it ( http://java.sun.com/j2se/1.5.0/docs/guide/javaws/index.html ) but I still don't know what they're talking about. But the only relevant-looking stuff it says there is:

Java Web Start is an application-deployment technology that gives you the power to launch full-featured applications with a single click from your Web browser. You can now download and launch applications, such as a complete spreadsheet program or an Internet chat client, without going through complicated installation procedures.


So, is it an applet that checks if you have a jar file present on your system (scanning your hard disk's appropriate directories maybe?), and downloads it if it isn't present?

They talk about "complicated installation procedures". Just download and double-click a .jar file. What's so complicated?
Nick Gusev
Greenhorn

Joined: Jun 16, 2005
Posts: 5
No, JWS isn't applet. It's actually application which handles specific MIME type (jnlp). In addition to just starting it does many additional things like signature/rights checking, supporting multiple jar files, downloading right jre, comparing local jars with remote one (version updates), etc. From user point of view it's application started from website. BTW, doubleclick works on windows only.

Nick
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24168
    
  30

Originally posted by Nick Gusev:
BTW, doubleclick works on windows only.


I imagine Mr. Gabriele will be rather surprised by this news, as am I. I guess I've just deluded myself all these years that I'm able to start Java applications on Linux under KDE by double-clicking on .class files and JAR files. Perhaps it's just an incredibly realistic simulation ...

In any case, to answer the original question: JWS provides a middle ground between applets and applications for client-side deployment. They're sandboxed like applets, but not quite so tightly; and they're installed locally, like applications, but updated automatically the way applets essentially are. The user experience is, as we've said, basically that of clicking on a web link, and starting an app -- just as you can click on a link to a Word document and start OpenOffice.org -- I mean, Microsoft Word.


[Jess in Action][AskingGoodQuestions]
Jared Cope
Ranch Hand

Joined: Aug 18, 2004
Posts: 243
Hi,

Originally posted by Ernest Friedman-Hill:

The user experience is, as we've said, basically that of clicking on a web link, and starting an app -- just as you can click on a link to a Word document and start OpenOffice.org -- I mean, Microsoft Word.



But just for the record, webstart can also create a desktop icon for you (in windows environment) so that users only need to double click the desktop icon and it will launch the application. There is no need for them to launch the application from a link in a webpage.

All the update checks and verification is done in the background for them each time they start the application.

Unless the end user is particularly savvy about technical details, they are not even aware of the difference between the desktop icon that starts Word, and the desktop icon that starts the java webstart app. To them, they are just two applications that are installed on their PC for them to use.

Cheers, Jared.


SCJP 1.4 91%, SCJP 1.5 88%, SCJD B&S
Nick Gusev
Greenhorn

Joined: Jun 16, 2005
Posts: 5
Originally posted by Ernest Friedman-Hill:


I imagine Mr. Gabriele will be rather surprised by this news, as am I. I guess I've just deluded myself all these years that I'm able to start Java applications on Linux under KDE by double-clicking on .class files and JAR files. Perhaps it's just an incredibly realistic simulation ...


Ok, you got me. I can do it too. Still works for single jar with main class only.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24168
    
  30

Originally posted by Nick Gusev:

Still works for single jar with main class only.


Easy enough to add a custom association for .class files, too.
John M. Gabriele
Ranch Hand

Joined: Feb 18, 2001
Posts: 232
Thanks for the informative replies fellas.

Nick wrote:
> No, JWS isn't applet. It's actually application which handles specific
> MIME type (jnlp).

Ah. So, it sounds like a browser plug-in/app that talks to your Java implementation (giving it special instructions) when you click a certain type of link.

Sounds like it's got some "phone home" stuff built-in too (for updating the app if it needs updating).

If you've got a link to the JWS-tied app on your desktop, it sounds like that link must actually run this local JWS program, which then by proxy runs the actual app.

I guess for 90% or so of computer users out there, JWS might be nice to save them from having to choose a place on their hard disk to save a .jar file, and then run it. Those same folks might also like the fact that an app can update itself when you run it (presumably asking you in a popup dialog if you want to update it).

For me though, I'll just stick with "gij -jar Foo.jar" (or "java -jar Foo.jar depending on which implementation I'm using). I haven't ever bothered trying to figure out how to put icons on this IceWM desktop of mine, so I never really double-click anything anyway.

Thanks again.
---J
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Just what the heck is "Web Start"?
 
Similar Threads
what is webstart and jnlp?
What is web-start
Web Start
package or tool for downloading updates to software
Create Swings application as windows setup file