<p>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.</p>

<p>Why don't sites use java applets anymore?</p>

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

[{'answer_id': 51394, 'author': 'Bernard', 'author_id': 61, 'author_profile': 'https://Stackoverflow.com/users/61', 'pm_score': 2, 'selected': False, 'text': "<p>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.</p>\n\n<p>There are Java applets here and there; definitely not widespread though.</p>\n"}, {'answer_id': 51395, 'author': 'zappan', 'author_id': 4723, 'author_profile': 'https://Stackoverflow.com/users/4723', 'pm_score': 2, 'selected': False, 'text': "<p>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.</p>\n\n<p>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.</p>\n\n<p>applets still live in some different areas, like control centers for roads, tunnels, power plants and stuff like that.</p>\n"}, {'answer_id': 51396, 'author': 'Georgy Bolyuba', 'author_id': 4052, 'author_profile': 'https://Stackoverflow.com/users/4052', 'pm_score': 2, 'selected': False, 'text': '<p>People still use applets. But you are right, there are tons of different solutions out there. For example, take a look at <a href="http://java.sun.com/javafx/" rel="nofollow noreferrer">javafx</a></p>\n'}, {'answer_id': 51397, 'author': 'David Webb', 'author_id': 3171, 'author_profile': 'https://Stackoverflow.com/users/3171', 'pm_score': 2, 'selected': False, 'text': '<p>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.</p>\n\n<p>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 <a href="http://java.sun.com/javase/technologies/desktop/javawebstart/index.jsp" rel="nofollow noreferrer">Java Web Start</a> 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.)</p>\n\n<p>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. </p>\n'}, {'answer_id': 51398, 'author': 'Frank Krueger', 'author_id': 338, 'author_profile': 'https://Stackoverflow.com/users/338', 'pm_score': 3, 'selected': False, 'text': "<p>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.</p>\n\n<p>However, remember that Java's big promise has been achieved. We have Flash, Java Applets, Silverlight, and ever-improving JavaScript frameworks.</p>\n\n<p>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.</p>\n"}, {'answer_id': 51399, 'author': 'Jon Limjap', 'author_id': 372, 'author_profile': 'https://Stackoverflow.com/users/372', 'pm_score': 6, 'selected': True, 'text': "<p>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). </p>\n\n<p>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.</p>\n"}, {'answer_id': 51402, 'author': 'Jonathan Allen', 'author_id': 5274, 'author_profile': 'https://Stackoverflow.com/users/5274', 'pm_score': 3, 'selected': False, 'text': "<p>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.</p>\n"}, {'answer_id': 51403, 'author': 'wvdschel', 'author_id': 2018, 'author_profile': 'https://Stackoverflow.com/users/2018', 'pm_score': 1, 'selected': False, 'text': "<p>The JVM is very widespread, especially in the coorporate world, at least where I've worked, there was always a JVM installed.</p>\n\n<p>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.</p>\n"}, {'answer_id': 51405, 'author': 'Blorgbeard', 'author_id': 369, 'author_profile': 'https://Stackoverflow.com/users/369', 'pm_score': 3, 'selected': False, 'text': '<p>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.</p>\n\n<p>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.</p>\n'}, {'answer_id': 51406, 'author': 'diciu', 'author_id': 2811, 'author_profile': 'https://Stackoverflow.com/users/2811', 'pm_score': 3, 'selected': False, 'text': '<p>I think applets are collateral damage in the battle between Microsoft and Sun.</p>\n\n<p>At first, the JVM was very slow to load and demanded too much memory.\nThen, when increase in computing power made the JVM possible, Sun played hard as it attempted to control all things Java:</p>\n\n<blockquote>\n  <p>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. <a href="http://www.crn.com/it-channel/18828525" rel="noreferrer">Microsoft Reverses Course, Will Include Java VM In Windows XP--For Now</a></p>\n</blockquote>\n'}, {'answer_id': 51410, 'author': 'Tony BenBrahim', 'author_id': 80075, 'author_profile': 'https://Stackoverflow.com/users/80075', 'pm_score': 4, 'selected': False, 'text': '<p>1) AWT made for horrid UIs. Swing improved on that but it was too late, because...<br>\n2) 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.<br>\n3) So today you cannot be sure that an applet will run on the majority of non-developer machines, unlike flash.   </p>\n\n<p>Same can be said of ActiveX by the way.</p>\n'}, {'answer_id': 52279, 'author': 'bpapa', 'author_id': 543, 'author_profile': 'https://Stackoverflow.com/users/543', 'pm_score': 3, 'selected': False, 'text': '<p>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.</p>\n\n<p>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?"</p>\n'}, {'answer_id': 302917, 'author': 'feoh', 'author_id': 32514, 'author_profile': 'https://Stackoverflow.com/users/32514', 'pm_score': 4, 'selected': False, 'text': '<p>For what it\'s worth, Sun is pouring money and resources into applets again.  They\'ve made some really significant improvements in <a href="http://java.sun.com/developer/technicalArticles/javase/java6u10/" rel="noreferrer">JDK 1.6.10</a> 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.</p>\n\n<p>They\'ve also embarked upon an initiative to directly compete with Flash and Silverlight - <a href="http://www.sun.com/software/javafx/" rel="noreferrer">JavaFX</a>.</p>\n\n<p>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.</p>\n'}, {'answer_id': 602014, 'author': 'PhiLho', 'author_id': 15459, 'author_profile': 'https://Stackoverflow.com/users/15459', 'pm_score': 2, 'selected': False, 'text': '<p>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.<br>\nAdvantages: can leverage existing libraries (math, physics, sorting, graph, etc.) and it is faster than Flash.<br>\nInconvenience: 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).</p>\n\n<p>You can still find lot of game applets too, like <a href="http://www.en.zylom.com/game/118/bookworm.html" rel="nofollow noreferrer" title="Bookworm">Bookworm</a>, with the added advantage, perhaps, to have part of work already done to run them on mobile phones...</p>\n\n<p>Second, I can predict a regain of interest with JavaFX. Applets on steroids, able to break legend of "applets are ugly"... :-)</p>\n\n<p>Last, a library like <a href="http://processing.org/" rel="nofollow noreferrer" title="Cover">Processing</a> makes super easy to create graphical intensive applets, and you can find lot of them on the Net, eg. on <a href="http://openprocessing.org/" rel="nofollow noreferrer" title="OpenProcessing">OpenProcessing</a> where the worst (beginners in programming) is near the best!</p>\n'}, {'answer_id': 18901399, 'author': 'Clivant Yeo', 'author_id': 1493804, 'author_profile': 'https://Stackoverflow.com/users/1493804', 'pm_score': 2, 'selected': False, 'text': '<p>People are still using applets, at least for the company that I am working with. The applets are used mainly by internal users.</p>\n\n<p>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. </p>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>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.</p>\n'}]
['https://Stackoverflow.com/questions/51390', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3561/']