Java Web Start vs Embedded Java Applet
Asked Answered
S

6

27

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?

Stitching answered 27/3, 2010 at 18:16 Comment(0)
C
22

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

Currey answered 27/3, 2010 at 18:34 Comment(5)
Is there a significant difference between applet and WebStart performance?Isidroisinglass
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/…Currey
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.Dittman
I find the comparison table obsolete. NPAPI is a deprecated technology, so you'd better go for JWS.Kern
@Enrique, How can I contact you?Antipodes
V
4

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.

Vert answered 30/3, 2010 at 21:27 Comment(1)
I don't think JWS is "more difficult to run". If a JRE is properly installed, it will just show one prompt.Dittman
I
3

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.

Isidroisinglass answered 27/3, 2010 at 19:9 Comment(0)
C
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.

Cowes answered 6/9, 2011 at 6:51 Comment(0)
K
3

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.

Kern answered 25/11, 2014 at 13:15 Comment(0)
F
-2

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.

Fleabag answered 31/3, 2010 at 4:17 Comment(3)
-1 Irrelevant, this is common to both JWS and applets. The question is not about problems with Java in general.Dittman
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.Fleabag
Applets requires the client to install the java plugin and also JRE.Kern

© 2022 - 2024 — McMap. All rights reserved.