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?
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?
Since Oracle is not making any progress in delivering a non-NPAPI java plugin, I would say that applets is an obsolete technology.
Otherwise, we would dive into a good old IE-only web. Banks are already requiring IE browsers so they would not spend tons of money to modernize their software. I feel sorry for them.
You can actually have both applets and web start with the same Java applet code. Web start supports launching unmodified applet .jar in a separate frame, all you need is to write JNLP file properly. You can specify the applet parameters in JNLP file, if required. The only difference is that the applet will pop out in a separate frame and not as part of the web page which may or may not be a problem. Why not to provide both applet and web start link? JNLP is not much more difficult to write than the applet tag.
I think it should not be much difference between Web start and applet performance unless applet runs in some old JRE that is part of the browser. I would not recommend this anyway - as any other software, Java evolves and gets better over time. This may explain posts talking about that Web start application is much faster, this otherwise would be very difficult to understand. If you applet supports also old JREs, I think you can simply specify the low version number in JNLP, adding + so it can also run with future versions.
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
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.
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.
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.