Client Java vs (Adobe) Flash for web applications, what to choose and when

A few years ago client Java was unsuitable for web development because a remarkable part of web users did not have Java installed. ( I don't remember exact numbers, more than 10%).

Now I see the Google Analytics stats for a big site and it tells that >98% of users have Java installed.

Is these stats very biased by Javascript usage? As I understand Google Analytics measure only users that has Javascript.

Is the picture similar on other big sites?

Does client Java have really "stopper" drawbacks compared to Flash?

EDIT: I mean java applets mainly, java WebStart seems to be not suitable for average user.
I mention Javascript only to describe the way Google Analytics works.

Asked by: Adrian305 | Posted: 28-01-2022

Answer 1

When I wrote my diploma project, I had to choose between Flash and Java Applets. Here are some pros and cons:

Java Applets:

  • [plus] you program in Java, which is mature and stable
  • [plus] you can use the Java GUI frameworks that pack a lot of punch
  • [minus] the first time the user hits the page with the applet, the JVM must be initialized and this can take up to a few minutes even on a fast computer
  • [minus] Applets are not meant to be used as animation media; sure, you can do stuff, but it is like programming in C - you do everything from scratch

example: i needed to show a data packet as it moved between two routers. The packet must be a control of some sort, like a button or smth. This animation can be defined in 1 line of code in Flash, where all objects derive from some base object that can be animated. I could not find a suitable solution in Java.


  • [plus] really really focused on animations;
  • [plus] ActionScript is actually an OO language
  • [minus] ActionScript is sloppy, bughish and has only a few supporters. If you are stuck, be prepared to search obscure Japanese forums for solutions
  • [minus] ActionSCript may be OO, but it lacks a lot of features, like Enums, fully fledged interfaces, threads (!!!!) etc.
  • [minus] Flash was designed to be used by non-tech people - they just use the authoring tool; I wrote code for everything and it worked, but it was a pain.

My conclusion:

I eagerly await a programming paradigm for animations and rich client interfaces.

ps: Silverlight seems to be a disappointment so far, maybe Microsoft will inject some $ into it.

Answered by: Sam992 | Posted: 01-03-2022

Answer 2

Mmm, Java seems to be better supported than I though, I searched some stats and found between 92 and 96% of browsers support Java (ie. it is enabled enough to detect it! although I guess lot of Java detection algorithms use JavaScript to detect & report - as you point out - but JS support is very good too anyway, even more in our Web 2.0 era).
Adobe boasts better support, but overall the difference is rather marginal. Anyway, somebody really wanting to see/use the application will activate/upgrade/download the needed engine.

Now, we have to see what JRE is supported! Alas, I didn't found any stat for that.
There, Adobe have an edge: not everybody have Flash 9 or 10, but upgrading is quite fast. While downloading and installing a new JRE is quite a bigger task... Of course, you can target the historical lowest common denominator Java 1.1, or more realistically Java 2 (1.4), but it is still frustrating not to be able to use all 1.6 features...

I have seen some people complaining that Java applets crashes their browser (apparently on Unix systems) but it is more an issue with a minor number of browsers/systems than anything else.

And as pointed out, startup time of a Java applet is quite longer than for Flash (although some big Flash games are slow to load too).
Now, I have seen a number of Processing applets, like the notorious Webpages as graphs, most of them load quickly: lot of the power is already on the hard disk of the user, in the extensive Java library. Processing generates quite lightweight jars, while lot of Flash applets must include foreign libraries... or reinvent the wheel!

Answered by: Charlie431 | Posted: 01-03-2022

Answer 3

Some previous postings are obsolete in regard to comments on ActionScript. ActionScript3. became available in the Flex 2 time frame, i.e., January 2007 when Flex 2.0 and Flash player 9 shipped.

AS3 is a full blown OOP programming language comparable to Java. It has classes and interfaces, inheritance, access protection keywords for class members, constructors, statics, plus some nice things that Java doesn't have: properties, events, declarative data-binding, and closures.

By default AS3 is statically compiled, hence one declares the type of members and variables. This can be relaxed to where AS3 can revert back to dynamic typing ala JavaScript. It is less efficient at runtime, though. Sometimes when dealing dynamic data it is none-the-less useful to selectively employ dynamic classes. (A nice benefit of static type checked language is code completion in the Flex Builder IDE.)

Much of Flex development is accomplished using MXML. This is a declarative XML-based DSL for Flex. MXML gets compiled into ActionScript3 code, though. So what you do in MXML is equivalent to AS3 imperative coding, but can often be more concise, clearer, and more appropriately structured with respect to the underlying graphical Flex form it represents (i.e., MXML is good for coding the views of the MVC pattern).

The bottom line is that ActionScript3 programming of Flex is easy and natural for a Java or C# programmer to learn. The language is not at all the issue. The power of Flex comes in becoming intimate with the Flex SDK and the myriad capabilities found there.

Answered by: Ryan601 | Posted: 01-03-2022

Answer 4

Not an exact answer, as it would be very opinionated, just sharing my experience...

In a recent project, where we were building a WAI compliant site, we were asked to avoid flash objects as accessiblity was a major issue. Applets on a different note don't go very well with most web developers ;). One reason might be the differences in the paradigms of Rich UI vs. web UI.

However, we found applets to be irreplaceable (not speaking for .NET and ActiveX controls) when client side monitoring was needed. The application uses SmartCard based authentication and applets are loaded into browser to listen for client side events (card removal) and alert the server to end session.

In this context I tend to feel that Flash is meant to be eye candy (view) where as applet though designed to be versatile, takes the role of model on client side. It is to be noted that both applets and flash consume CPU cycles on client machine, hence were traditionally suited for tasks involving lengthy computation. Calculators, Report generators, Trend illustrators, Astrological chart generators (yes) and other tasks where data can be fed by user and are results shown immediately make use of these.

A major concern involves lack of client side software (Java, flash plugins). The user experience in such cases is more than annoying.

Answered by: Sawyer155 | Posted: 01-03-2022

Answer 5

Noticed some comments about java not updating itself. Now 1.6.0_10 is out, and it's updating itself more easily and automated than before, and you have the option of a new install method, the java kernel one. This automates the install of java components as you need them.

Some text about this:

So there are changes, Sun just wakes up with the new Ceo i think. I know it's 1-2 years until this new system propagates but you can start your project and have fun when it's ready maybe. :) Who knows.

Anyway, maybe you work +500% for easy animated features than flash, but if your app is not a simple animation, then you work +500% with flash for some simple 3 line java code substitution :) Depends on your app.

Answered by: Paul173 | Posted: 01-03-2022

Answer 6

I worked in Java for the last 7 years, and then I recently started on AS3 on my newest project (1.5 years and going). I love AS3 and Flash, and here's why:

  • The language itself is very similar to Java. The documentation at Adobe is as good or better than JavaDocs.
  • The AS3 language supports XML as a native type. Parsing XML in Java is a nightmare.
  • There are nice animation and graphics frameworks for Flash, such as papervision 3D and tweener.
  • If you use the Flex 3 framework and Flex Builder 3, building interfaces that look as good or better than Swing is trivial. I loved writing UIs in Swing, but designing UIs in the visual Flex Designer is like a breath of fresh air.
  • I'm pretty sure that there's more browser support for Flash.
  • Have you ever seen a Flash applet load? It has really poor usability, and makes your user click through two or three dialogs before the applet starts. Flash apps just work.

Good luck on your project!

Answered by: Ryan896 | Posted: 01-03-2022

Similar questions

java - What is a good toolkit for developing Blackberry applications?

Looking for a toolkit/SDK for general Blackberry development or application toolkits. Anything like an MVC framework?

web applications - Abstract Java Grid

I'm looking for an abstract representation of a grid in Java (grid as in that thing with columns and rows of data). Do such things exist? I want to be able to sort, filter, keep track of rows, set column properties etc. I'll then be realising the grid on the web. To be clear: I've already decided on the ultimate view technology (client side). The thing I'm looking for will hold all the records and offer them up...

java - What would be the best way to match up two object instances between two different applications in a J2EE server?

I have a J2ee application where I basically want two objects, created by two separate servlets to communicate directly and I need these intances to be stable, i.e. to "know" each other during the session. The sequence is roughly: Client sends a request to Servlet #1, which creates object A Client sends a second request (after the first returns) to servlet #2 which creates object B. ...

web applications - Is there a tool to generate web pages based on Java beans?

Is there a tool that will take you java beans (pojos) and automatically make them a form for a webpage? To be more clear I have a bunch of Jaxb objects that I want to be able to display in a form without having to code a bunch of html. Is there a tool that will read the jaxb objects and generate the editable form for me? Also, this needs to run on a glassfish server...

What do I need to write Java-based web applications and test them on my personal computer?

I currently have Apache HTTP Server, but I'm guessing I'll need Tomcat (and then have to configure it in a way that makes it not open to the public), a Java JDK (which I already have, but should probably update), and an IDE (I have Eclipse). But what else should I have or know before starting?

java - How does IIS compare in terms of performance and scalability to weblogic and websphere for enterprise web applications?

Closed. This question is opinion-based. It is not c...

c# - IPC between .NET and Java client applications

I must get two different client application talk without any kind of broker or server. What is the best method for IPC beween two process, Java and .NET? It must able to be work in multi-user termainl server, so no socket please. I wish that it is lightweight and simple, something plug and run, so no RMI/WS please. I'm now thinking about JNI to access Mutex and Named pipes, am I going to a right direction?

Is Java suitable for "Web 2.0" applications?

Closed. This question is opinion-based. It is not c...

How to develop multi-touch applications in Java?

Anticipating the day when multi-touch interfaces become more pervasive, are there libraries in Java that can be used for developing touch applications? I'm looking for interfaces similar to MouseListener / MouseMotionListener / MouseWheelListener.

web applications - What is a good embeddable Java LDAP server?

I'm working on a Java web application that integrates with a few other external applications that are deployed along with it. Authentication information must be synchronized across everything and the other applications want to authenticate against LDAP. The application will be deployed in environments where there will be no other LDAP server for everything to use; I have to provide it. My solution so far has been to use

Still can't find your answer? Check out these amazing Java communities for help...

Java Reddit Community | Java Help Reddit Community | Java Community | Java Discord | Java Programmers (Facebook) | Java developers (Facebook)