I'm still a student, without much real life experience in programming. I've never written anything bigger than ~5k lines of code. I've written code in both Flash and Java, and I just can't understand why people are writing web applications like video players (YouTube etc.) in Flash, and not as Java applets. So I want to ask you, programmers with hands on experience, for some wise words on the subject.

I see no real benefit of Flash over applets, while on the other hand, at least to me, it seems buggy as hell. I understand it is faster to make something in Flash, and I can see why it would be a good thing for fast prototyping, but in general, is it worth it? Every time a YouTube goes berserk, i curse the developers for writing it in Flash. And if you are using Linux with Opera, this happens all the time.

So, basically, why are people using flash, and not applets?

  • 4
    Java applets, ugh... – Anto Feb 12 '11 at 17:34

Flash provides a more seamless experience for the user. Java applets are pretty slow, since the Java VM needs to be fired up before they can run. As a website visitor, I hate it when things freeze for a few moments while the Java VM figures itself out. If I'm not mistaken, it also doesn't unload once I navigate away from the website that used it, leaving it hanging around when I didn't really want it to run in the first place.

My (admittedly limited) experience with Flash and applet development also tells me that developing an animation in Flash is easier.

And then there's history. Microsoft didn't do Java applets any favours by developing their own JVM and making it behave differently from Sun's. As a result, the same applet could work in one browser and not another, which made creating Java applets less viable.

Java does have free tools that can be used as opposed to proprietary Flash editors required to make Flash videos, but ultimately its heavy-handed approach makes it inferior.

  • 4
    Agreed, the JVM warmup time is most likely the reason that Flash ate the Applet-lunch – user1249 Feb 12 '11 at 19:54
  • 1
    Also, Flash was primarily made to create great interactive experiences with lots of graphical content, sound and animation. Java is a general purpose language not necessarily the best choice for creating web content. – Martin Wickman Feb 12 '11 at 22:44
  • 3
    Sun fighted successfully against the MS-attempt to make applets less liable at court. There is no MS-Java around any more, it was forbidden. – user unknown Feb 13 '11 at 1:05
  • 1
    One might say that Sun's legal success caused the technical failure in that arena. With no default JVM in Windows (the most widely distributed end-user OS on the market), Flash had the opportunity to become the de-facto standard and seized upon that. Microsoft shrugged and created .NET in response to the JVM ruling and then Silverlight in response to Flash. Now HTML 5 is poised to obsolete most of those client-side solutions. The circle of life. – Jesse C. Slicer Mar 6 '12 at 16:42

Flash audio and video playback is as buggy as hell, but Java isn't always better. I've had some immensely frustrating problems with Java games when Sun has introduced a bug between minor versions which screwed up the applet lifecycle. They only really started getting their act together with applets about a year ago, and even then it wasn't perfectly smooth.

As far as games go, the biggest advantages of Flash were probably a more specialised development environment and good library support for vector graphics. The biggest advantage of Java was probably the ability to do true 3D with a signed applet and JOGL/LWJGL.


The runtime overhead for Java Applets (in Windows at least) is far clunkier and slower than that of Flash (in my experience), and I believe that the Actionscript language is higher level that of Java, therefore this makes things like animations and resource handling (such as music/videos) easier to develop.

  • 3
    ActionScript is just JavaScript with a different name. I'm sure people who wanted could have a long debate over whether it's higher level than Java, but at the language level the biggest difference IMO is dynamic vs static typing. – Peter Taylor Feb 12 '11 at 19:12
  • 2
    These days "Actionscript" generally means AS3, which is more like Java than JavaScript, and performs more similarly to Java because the VM JITs (unlike the AS2 VM, which only interprets). – fenomas Jul 7 '11 at 5:17

Java has never had very appealing UI. It took them years to even have anti-aliasing, making text hardly readable. Multithreaded rendering/interaction is afaik never implemented in the main java UI libraries. That adds to the already sluggish feel those UI libs have.

As java is designed for huge projects, it has a significant advantage using existing code in the browser.

Html capabilities have been significantly increased the past years. Cross-browser compatibilities have been edged out, and some features are added such as clientside storage and canvas.

GWT offers quite a nice API to create UI with highlevel classes and interfaces for panels and widgets. It translates it to javascript, making a fierce comeptitor for java applets and flash.

  • 2
    Anti-aliasing has been in Java since 1.2. I think it's more a case that people didn't take the time to learn how to turn it on. – Peter Taylor Feb 13 '11 at 7:49
  • And Java 1.2 dates from 1998. What's that nonsense about multithreaded rendering/interaction? Java is the language that is typically used to teach threads. That is to say, it has the most convenient and evolved threading model of all languages, today. (However, almost certainly not the most convenient threading model possible...) What "sluggish feel"? It's sluggish to load an applet, but once loaded, it has the most responsive feel you can get in a browser. – Evgeni Sergeev Jul 31 '15 at 5:14

Flash developers are cheaper than java developers on the whole. And you can find graphic designers capable of working in or with flash. So you can get a prettier product out cheaper.

  • 2
    Not anyone worth their salt. A good developer charges good developer prices. – MaxSan Mar 6 '12 at 17:05

simple answer is.. flash is for designers. and java is for programmers it doesn't get any easier than this.. not one better than the other.. they're just different tools for different jobs.. so to assume flash or java being superior to one another.. is just a bias.. they're just different tools both get the job done in different contexts.. as for the downvote.. i don't see your point.. it is relevant to say such things.. and not let bias get in the way..

you left a downvote ? how about telling us all why in a constructive manner? :)

  • +1 because you are right: flash is for web designers that evolve into web programmers. Java is for programmers that evolve into making websites. – Kris Van Bael Mar 6 '12 at 19:59
  • how about upvoting my response if you think it deserves a +1 :) hehe – marc-andre benoit Mar 7 '12 at 6:54
  • 1
    I did, naturally. – Kris Van Bael Mar 7 '12 at 7:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.