Re: Develop Update Server in Java
Simon wrote:
You haven't provided much information. What kind of "client" are
you talking about, and what do you mean by "update?" Or, turn the
question around: What is it about your situation that makes Web Start
inappropriate? What do you want to do that Web Start doesn't (or
what does Web Start do that you'd rather it didn't)?
I want to do what almost every consumer software product does these
days, e.g. Firefox, Adobe Reader, etc: When it starts, check whether
updates are available, if they are, annoy the user with an "Update Me
Now!" dialog, and download and install the update.
Okay. Web Start checks for updates, and downloads a new version
if available. Ordinarily the download happens automagically without
an annoying dialog, but there's probably a way to produce one if you
want it.
Regarding WebStart, there are four issues I see:
- Our application comes bundled with a JRE which also has to be updated.
I cannot bundle a download version with a JRE with WebStart, because
WebStart requires the JRE to be installed.
You can, however, specify what Java version(s) the application
requires, and tell the user to install it if it's not already present.
(Note that he may have obtained Java from some site other than yours;
why push him a redundant copy?)
There's probably a way to give some assistance, but I don't think
you can automate it altogether. (Note that you can't completely
automate the other upgrades you mention, either.)
- Part of the application requires a license key to authenticate the
download.
I don't know how to do this, but I'd bet its do-able. Probably
in multiple ways, depending on your needs.
- The software must also be able to display a list of "Available
Extensions" among which the user can choose.
Maybe I'm missing something, but that doesn't look like a problem.
It might be that all of the above can be addressed by WebStart, but I'm
afraid the most important reason is this one:
- People are not used to WebStart. They easily become irritated by
things they have never seen. They want to download an EXE file and run
it. (This is not my opinion, it's just whart I observe, and it *is* a
reason, although we may not like it.)
Reaction #1: <smartass_remark> People who object to anything new
will also object to your application, and won't run it no matter how
you package it. </smartass_remark>
Reaction #2: The initial installation of a Web Start application
consists of browsing to a URL and maybe accepting a certificate if the
app is signed. Thereafter, the user's involvement in obtaining and
installing upgrades and new versions is ... nil. The user never sees
the update process at all; it "just happens." If you've got users who
are irritated by things that aren't even visible, it might be better to
offer them medication than to try to program around them ;-)
Counter-reaction #2a: Well, "nil" is an exaggeration, because if
you need a new Java the user will have to get involved in installing
it. But this is the kind of installation you say the users like: go
to a URL, download, launch, watch the wizard.
Counter-reaction #2b: It's also not "nil" if you decide to insert
the annoying dialog and require the user to click it.
Reaction #3: You're making .EXE's from Java programs? Isn't that
rather old-fashioned? Maybe your users aren't the only people who
resist progress ;-)
I may have misunderstood you or otherwise missed something, but
from what you've said I don't see a reason to shun Web Start. Even if
the packaging is not exactly as you've imagined for your app, I think
you would do well to take another look at JWS -- If it's "close enough"
it'll have saved you a lot of effort.
--
Eric.Sosman@sun.com