d512
d512

Reputation: 34233

Questions about Java Web Start

I'm looking into deployment options for a desktop Java application that will run on Windows and Mac. I am currently looking at Web Start, but I have a few questions.

  1. If I can create an executable jar file and the user can just double click it to start the app, why do I even need to use Web Start? Why not just stick the jar file up on the web server and let the user download that? What am I getting out of using Web Start?

  2. My understanding is that Web Start comes when you install the JRE. But what happens if the user has not installed Java on their machine? Does it walk them through an installation process or do that have to go and download and install the JRE on their own?

Upvotes: 2

Views: 217

Answers (5)

Andrew Thompson
Andrew Thompson

Reputation: 168835

See the Java Web Start Wiki page here at SO for most of your answers.

1) What am I getting out of using Web Start?

From the 2nd paragraph:

JWS provides many appealing features including, but not limited to

  • splash screens
  • desktop integration
  • file associations
  • automatic update (including lazy downloads and programmatic control of updates)
  • partitioning of natives & other resource downloads by platform, architecture or Java version
  • configuration of run-time environment (minimum J2SE version, run-time options, RAM etc.)
  • easy management of common resources using extensions..

2) what happens if the user has not installed Java on their machine?

That is what the deployJava.js is for.

Java Rich Internet Applications Deployment Advice. Describes the deployJava.js script designed to ensure a suitable minimum version of Java is installed before providing a link to a JWS app. or launching an applet.

Upvotes: 4

praseodym
praseodym

Reputation: 2423

  1. Java Web Start allows users to launch the app without having to download the JAR first; the app can simply be started with one click in the web page. Furthermore it can ensure that the latest version of the app and all its dependencies are downloaded and can ensure that the JRE is up to date, and
  2. It can automatically install the JRE if it is not installed on Internet Explorer, and provides a download link on other platforms. See Oracle's documentation on Java Web Start.

Furthermore, the Wikipedia article also provides some useful information.

Despite this, even Oracle seems to have abandoned Web Start (the documentation link above, from Java 7, is severely outdated with VBScript and examples about Netscape) and less and less users have Java plug-ins enabled in their browser, mainly because of the many security vulnerabilities over the past couple of years.

Upvotes: 2

Ham Vocke
Ham Vocke

Reputation: 2994

Java Web Start enables your user to start the application with on click from the web (provided they have a JRE installed). The main advantages over letting your user download an executable jar are twofold:

  1. less hassle for your user (one click vs. downloading and executing)
  2. Java Web Start makes sure that your user always uses the most up to date version of your application. Given your other solution your user would have keep track of updating his local application himself or you would need to provide an update mechanism.

Java Web Start is included in all JREs since version 1.4.2. Your user will need to have this installed on his machine in order to run your Web Start application (he would have needed it for an executable jar as well).

Upvotes: 4

Zoltán
Zoltán

Reputation: 22166

Not sure about number 2, but here's my 2 cents on number 1:

To me the most important feature of JWS is that it takes care of your dependencies. If you use any libraries in your project, JWS will take care of installing them for the user.

The alternative to this would be for you to build a "fat jar" containing your dependencies within, which may not work for all types of dependencies.

Upvotes: 1

case1352
case1352

Reputation: 1136

Webstart has some cool built in versioning. When you release a new version it will download it.

You can sign your webstart apps

Some machines wont be configured correctly to allow "double click" to start a jar

Users without Java will need to install it. There is probably no easy way around that. The java site makes it pretty easy though

Upvotes: 2

Related Questions