Java vs. Flash: Which technology dominates on the client side?
Java
is a fully fledged computer language with a whole lot of great
functionality. It is good on the server side, and for desktop
applications, but is there a future for it as a browser plug-in?
Background:
For years Java has been available as a browser plug-in from Sun; new versions have been released regularly. Unfortunately the download was about 15MB; once installed, the plug-in could take up to 30 seconds to load on the average machines of that time, which was unacceptable for most users. Because of this, but mainly for compatibility issues, Java developers have been forced to target the Microsoft Java VM. Yes, it was crippled and extremely outdated, but it was built-in all versions of Internet Explorer and required no load time at all. At least until 2003 when Microsoft officially dropped Java support.
Macromedia Flash, until recently, was not regarded as a ‘real’ programming platform. However this is probably going to change with the upcoming version 3 of ActionScript, the Flash programming language. Flash makes it easy to create great visual effects, has audio and video support out of the box, and feels quick for the end-user. For many developers this is enough to make it the preferred choice for small multimedia applications that run inside browsers. There are no artificial obstacles, as was the case with MS JVM, plus Macromedia (now Adobe) does its best to keep the Flash Players installed worldwide up-to-date.
Ever since Microsoft dropped Java support for IE, developers knew that eventually Java client side applications will have to be moved to a different technology, Flash being the top (and only?) nominee. But how to justify such a step, and how to know for sure that the time has come?
The goal:
To determine, with a high level of accuracy, which technology currently dominates on the client side: Flash or Java.
The method:
We will use ‘real’ objects for detection, as opposed to classic methods that involve Javascript detection. This is to guarantee that any particular technology is really present and working inside the browser. The method involves a micro Java applet and Flash movie which are being dynamically embedded in the page via a Javascript. Their only job is to call back a Javascript function, once loaded. The callback function does the reporting by requesting specific URL; this request is logged on the server side. If no plug-in is installed, or execution fails for some reason, no reporting is done.
To conduct the study, we’ll use the following ingredients:
bcheck.js- the director, Javascript.FD.swfandJD.class- the twin brothers, Flash and Java micro applications.bcheck.gif– an empty image, which is being requested for logging purposes.- Web server access logs* and log analysis software.
- High-traffic web site(s) to temporary embed the script into and poll real world data.
There are two types of requests in the raw access logs, which we are interested in:
- Requests to
bcheck.js: The total number of real users ‘participating’ in the study, or everyone who visited the detection pages. - Requests to
bcheck.gif: People who actually had a plug-in installed and working (?F=version- for Flash and?J=version- for Java)
Additional info collected for each request: user agent string and referrer.
The results:
Stats sample was collected for about 12 hours on 18-Apr-2006. The detection script was embedded on
realchat.com
and some of the other sites that we control. The total number of unique
IP addresses reached 3000+, which we consider enough for a good sample.
The results, a bit shocking for Java developers, follow:
Unique Visitors: 3314
Flash enabled: 95,75%
Java enabled: 56,43%
April 2006: Java is losing the battle of the browser plug-in
technologies with about 57% penetration. The Flash Player is ubiquitous
with nearly 96% of users being able to view Flash content.

A very interesting fact is that the 7-years old MS VM 1.1.4 still accounts for more than the half of Java penetration; with new versions of Windows shipping without that JVM, it is easy to predict that the whole Java share will continue to shrink. What is even worse is that developers who target Java on the browser side, will still be forced to use MS JVM, at least for a few more months.
Flash, on the other hand is really up-to-date, with its latest version 8 reaching nearly 75% of all installations.

Notes/Resources:
Questions that could be answered but require deeper log analysis:
- How many users have both Flash and Java installed?
- How many users have only one of the platforms? (Flash or Java)
- How many users don’t have any of the platforms? (no Flash, no Java)
- What is the technology breakdown by browser and OS?
Drawbacks of the method used:
- Only works for browsers with Javascript enabled.
- Might be losing few hits for people who quickly navigate out of the page without giving the applet and flash movie time to execute.
Sources: bcheck.js, JD.java, FD.as
Similar studies:
There is a bunch of resources on the subject, most of them quite old. The most significant one is the Macromedia Technology Breakdown, which is about to be updated in May 2006.
Related articles:
- Java vs Flash/Actionscript by Simon Breslav
- Technology Penetration Report by SecuritySpace.com, measuring what technologies do web sites use