Reputation: 34233
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.
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?
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
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
Reputation: 2423
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
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:
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
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
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