Where did all the java applets go?

JavaApplet

Java Problem Overview


When java was young, people were excited about writing applets. They were cool and popular, for a little while. Now, I never see them anymore. Instead we have flash, javascript, and a plethora of other web app-building technologies.

Why don't sites use java applets anymore?

I'm also curious: historically, why do you think this occurred? What could have been done differently to keep Java applets alive?

Java Solutions


Solution 1 - Java

I think Java applets were overshadowed by Flash and ActionScript (pun unintended), being much easier to use for what Java Applets were being used at the time (animations + stateful applications).

Flash's success in this respect in turn owes to its much smaller file sizes, as well as benefiting from the Sun vs. Microsoft suit that resulted in Microsoft removing the MSJVM from Internet Explorer, at a time of Netscape's demise and IE's heavy dominance.

Solution 2 - Java

  1. AWT made for horrid UIs. Swing improved on that but it was too late, because...
  2. Microsoft dropped support for Java in the browser (its propietary MSJVM), and before it did, it would only support the last version it released, which was roughly JDK 1.1 compatible.
  3. So today you cannot be sure that an applet will run on the majority of non-developer machines, unlike flash.

Same can be said of ActiveX by the way.

Solution 3 - Java

For what it's worth, Sun is pouring money and resources into applets again. They've made some really significant improvements in JDK 1.6.10 to mitigate a lot of the 'clunkiness' applets used to exhibit. For instance, with this update, you can display your own custom loading image/animation while your applet loads, and the plugin has been put on a major diet to improve performance.

They've also embarked upon an initiative to directly compete with Flash and Silverlight - JavaFX.

Whether or not the market will respond to any of this remains to be seen, but it's certainly a fascinating move on Sun's part given Flash's dominance in the market place.

Solution 4 - Java

By the time Java's GUI API stopped totally sucking, everyone was using Flash. And even today, Java is no where near as good as Flash at doing fancy graphics.

Solution 5 - Java

I assume it's because java is a "real", ie. general purpose language. To make an applet, you have to write code, and there aren't any shortcuts.

Now that flash etc have come along, you can pretty much just drap and drop your way through making a cool animation for your website. This is a much lower barrier for entry - you don't have to know how to program in order to get a flash animation working. So flash proliferates, and java applets are hardly used anymore.

Solution 6 - Java

I think applets are collateral damage in the battle between Microsoft and Sun.

At first, the JVM was very slow to load and demanded too much memory. Then, when increase in computing power made the JVM possible, Sun played hard as it attempted to control all things Java:

> As part of another private antitrust lawsuit filed against Microsoft by Sun in March, Sun sought a preliminary injunction requiring Microsoft to include a current Java virtual machine (JVM) in the Windows XP operating system. Microsoft said the decision to include the JVM this week is a direct result of the latest legal entanglement with Sun, but Microsoft plans to disband support for Java in Windows following Jan. 1, 2004. Microsoft Reverses Course, Will Include Java VM In Windows XP--For Now

Solution 7 - Java

They took forever to load up and get going in the browser, and then for a lot of people they didn't work. When they finally did load, the interfaces were ugly and clunky. I think the poor user experience was a big step towards making applets obsolete.

So to answer the original question I have a question of my own - you ask "Why don't sites use java applets anymore", and my response is "why would anyone want to?"

Solution 8 - Java

I see them a lot in acedemic settings (hosted on department or faculty sites), but you're right in that they are not very popular.

However, remember that Java's big promise has been achieved. We have Flash, Java Applets, Silverlight, and ever-improving JavaScript frameworks.

Now if I made add a personal opinion - I think that Java applets are inelegant. They tend to look ugly, the Java runtime makes its presence in the OS far too known (in terms of runtime visuals, updates, and the ugly installer). Flash is much better with its rich media environment and its transparent (and ubiquitous) deployment.

Solution 9 - Java

People still use applets. But you are right, there are tons of different solutions out there. For example, take a look at javafx

Solution 10 - Java

I think compatibility issues were a big problem. Most notably with IE and Microsoft's Java VM which wasn't as standards compliant as it might have been.

Even with the Sun JVM you could have problems. I've had fun where I've had two 3rd-party Applets requiring different versions of Java which causes all sorts of problems. Sun have tried to solve this problem by replacing Applets with Java Web Start which gives you a link in the browser that launches the application in it's own window instead of inside the browser. (In theory with JWS you can have different applications using different VMs but it never seems to work for me as well as it should.)

Advancements with JavaScript have also made it possible to developer much richer web pages so a lot of things in the past that you could only do in Applets can now be done simply with AJAX.

Solution 11 - Java

First, they not gone. You can still find lot of applets on the Web, lot of people use them particularly to demonstrate algorithms and such.
Advantages: can leverage existing libraries (math, physics, sorting, graph, etc.) and it is faster than Flash.
Inconvenience: it might be risky to target a recent JVM (although Sun did a good job on automatic updates, looks like lot of people are using Java 1.6 already), load time is a bit slow (even though great progress have been made there).

You can still find lot of game applets too, like [Bookworm](http://www.en.zylom.com/game/118/bookworm.html "Bookworm"), with the added advantage, perhaps, to have part of work already done to run them on mobile phones...

Second, I can predict a regain of interest with JavaFX. Applets on steroids, able to break legend of "applets are ugly"... :-)

Last, a library like [Processing](http://processing.org/ "Cover") makes super easy to create graphical intensive applets, and you can find lot of them on the Net, eg. on [OpenProcessing](http://openprocessing.org/ "OpenProcessing") where the worst (beginners in programming) is near the best!

Solution 12 - Java

I wonder how widespread the JVM actually is? In the case of Flash, IE5 preinstalled it, giving it a large automatic user base. But unless the JVM was included with the OS install, users wouldn't have it. I suppose as a developer you target the largest install base, meaning choosing Flash over Java.

There are Java applets here and there; definitely not widespread though.

Solution 13 - Java

i believe it's their ugliness that kept them away from the modern web. flash brought the design, javascript brought a convenient way to make some cool things on a client. being a box inside a browser (just like a flash, though, but much uglier) applet technology was put away.

actually, the only thing that might be missed is the possibility to have a 'client-server' type of communication inside the web, because java applet could have a stateful connection. on the other hand, you would have to put some server on the other side and open a port for it, which just was too much house-work for shared hosting environments.

applets still live in some different areas, like control centers for roads, tunnels, power plants and stuff like that.

Solution 14 - Java

People are still using applets, at least for the company that I am working with. The applets are used mainly by internal users.

I feel that applets have their benefits, as companies which employ Java at the server side, most probably will have a large pool of talents who are better skilled at Java.

Although perhaps other technologies like Javascript, HTML/CSS or flash are more popular or more fanciful, but the talent pool could be better employed to create web apps with Java applets as it is a language that they are already familiar with through their work with the server end stuff.

It could be faster for the Java talent pool to deliver a change request with Java applet solutions at a higher accuracy than any other technologies.

Sometimes, the most important thing in a technology solution is its functionality and how fast people who need to provide support for them can react to changes.

Solution 15 - Java

The JVM is very widespread, especially in the coorporate world, at least where I've worked, there was always a JVM installed.

I'm currently working on a Java Applet, but in general, I would never an applet unless I had to. But then again, I wouldn't use Flash or Silverlight, either. Applets have a slow load time, and look out of place in webpages. Also, Macromedia/Adobe have outmarketed the good ol' applets.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionTylerView Question on Stackoverflow
Solution 1 - JavaJon LimjapView Answer on Stackoverflow
Solution 2 - JavaTony BenBrahimView Answer on Stackoverflow
Solution 3 - JavafeohView Answer on Stackoverflow
Solution 4 - JavaJonathan AllenView Answer on Stackoverflow
Solution 5 - JavaBlorgbeardView Answer on Stackoverflow
Solution 6 - JavadiciuView Answer on Stackoverflow
Solution 7 - JavabpapaView Answer on Stackoverflow
Solution 8 - JavaFrank KruegerView Answer on Stackoverflow
Solution 9 - JavaGeorgy BolyubaView Answer on Stackoverflow
Solution 10 - JavaDave WebbView Answer on Stackoverflow
Solution 11 - JavaPhiLhoView Answer on Stackoverflow
Solution 12 - JavaBernardView Answer on Stackoverflow
Solution 13 - JavazappanView Answer on Stackoverflow
Solution 14 - JavaClivant YeoView Answer on Stackoverflow
Solution 15 - JavawvdschelView Answer on Stackoverflow