Java Web Start vs Embedded Java Applet

22,788

Solution 1

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

Solution 2

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.

Solution 3

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.

Solution 4

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.

Solution 5

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.

Share:
22,788
Matthew H
Author by

Matthew H

Updated on July 17, 2020

Comments

  • Matthew H
    Matthew H almost 4 years

    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?

  • Brett
    Brett over 14 years
    Is there a significant difference between applet and WebStart performance?
  • Enrique
    Enrique over 14 years
    Why the down vote? The biggest obstacle to an Applet is the default JVM memory is set to 64M. linkedin.com/answers/technology/software-development/TCH_SFT‌​/…
  • sleske
    sleske almost 14 years
    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
    sleske almost 14 years
    -1 Irrelevant, this is common to both JWS and applets. The question is not about problems with Java in general.
  • sleske
    sleske almost 14 years
    I don't think JWS is "more difficult to run". If a JRE is properly installed, it will just show one prompt.
  • Paul Clapham
    Paul Clapham almost 14 years
    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.
  • Vanuan
    Vanuan over 9 years
    I find the comparison table obsolete. NPAPI is a deprecated technology, so you'd better go for JWS.
  • Vanuan
    Vanuan over 9 years
    Applets requires the client to install the java plugin and also JRE.
  • VJ D
    VJ D over 2 years
    @Enrique, How can I contact you?