views:

439

answers:

4

Hi, I'm going to deploy my Java game to show it to my friends and whatnot, but I'm having trouble deciding between Java Web Start and applets.

Under what conditions is one preferable over another and what advantages/disadvantages are there?

+1  A: 

If your game is going to consume a lot of cpu and memory resources I recommend deploying it as Java Web Start since applets run slower.

If you have some java-javascript interaction you'd better use applets

Here you can find a table with advantages/disadvantages

Enrique
Is there a significant difference between applet and WebStart performance?
Tom Hawtin - tackline
Why the down vote? The biggest obstacle to an Applet is the default JVM memory is set to 64M. http://www.linkedin.com/answers/technology/software-development/TCH_SFT/144419-1368085
Enrique
In general it's wrong to say that "applets run slower". They may for some scenarios, but e.g. a CPU-bound algorithm will run at the same speed, no matter if it's inside an applet or a JWS app.
sleske
+2  A: 

I'd make it run as either, and then choose which to use. An applet will sit in a web page nicely. A WebStart application will look like a normal application (only with a little triangle to indicate it's from the web). From 6u10, applets can use JNLP services, and can be dragged out on to the desktop.

Tom Hawtin - tackline
A: 

Java applets have the advantage that they run instantly without the user having to click on anything. In addition, applets will automatically prompt the browser to download the Java plug-in if it's not already installed. This is important if your end users aren't very tech-savvy.

However, applets are extremely limited in terms of memory (60 - 90 MB), so if your game uses a lot of graphics you will notice a performance slowdown.

If performance is an issue, you will probably have to use Java Web Start. It suffers no performance penalty, but is a lot trickier to deploy and more difficult for end users to run.

Jephir
I don't think JWS is "more difficult to run". If a JRE is properly installed, it will just show one prompt.
sleske
A: 

Web Start requires the client to install the Java application (and possibly the JRE) on their computers. If they don't have administrative rights to install software this is going to be a problem.

Paul Clapham
-1 Irrelevant, this is common to both JWS and applets. The question is not about problems with Java in general.
sleske
Not so. With Web Start you must install the Java application but applets run in the browser and do not require installation. We ran into this issue at my company where software is locked down.It's true that both of them require an installed JRE but that is a separate issue. It may have been pre-installed, for example.
Paul Clapham