Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 542
d512 Avatar asked Jan 31 '26 18:01

d512


2 Answers

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.

like image 186
Andrew Thompson Avatar answered Feb 02 '26 10:02

Andrew Thompson


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).

like image 45
Ham Vocke Avatar answered Feb 02 '26 09:02

Ham Vocke