Antonio has posted 1 posts at DZone. View Full User Profile

A Concern for Java We All Should Share

  • submit to reddit

A few days ago an article appeared on Javalobby entitled What is Your Greatest Concern for Java? My main concern for Java in the last year has been the lack of progress on the desktop technologies front, and more generally as a development platform for client-side applications. And now, after reading that article, my main concern is how few people that share this same concern. This is why I decided to write this article where I hope to explain why I have am worried about this and above all why I think you should too.

First, to those that doubt: there are a lot of problems with Java on the desktop. I admit that there have been big improvements even before JavaFX such as the improvements with Swing (maybe driven at that time by the competition from SWT). We now have a fantastic OpenGL pipeline for Swing, great improvements with the DirectX pipeline and strongly improved startup times. A lot of great and very useful work has been done in the previous years, that's for sure.

Unfortunately, having said that, all the rest is a total mess. Trying to make a real, productive use of Java sound doesn't really work out for example. And what about the abandoned Java3D? Recently even JOGL has been dismissed by Sun, as well as SwingLab long time ago. Even JAI (for image processing) has not been seriously updated for ages and doesn't seem to be going anywhere at all. Some big improvements would be needed to use it effectively especially with the massive advent of multicore GPUs.

The point is that, yes you can make desktop applications with Java, but as soon as you want to develop really rich desktop applications you need to enter in the realm of JNI, C/C++, legacy and platform dependent libraries and the whole associated hell. Even having an effective and decent web browser in your Java application is still  a horrible headache.

As I see it,  Java on the desktop today is as good as it could be for someone that mainly develops server side and just need a rapid way to assemble simple interfaces to remote services from the desktop. In fact JavaFX is the perfect compliment in this scenario. But why are there  not (or there are too few and too limited) applications for image processing in Java? There is no one single pure Java web browser so far. No digital audio workstation applications, no 3D modelers, vector graphic editors, advanced raster editors. These are the kind of enhanced desktop applications that are very hard to develop with Java, but not with other technologies. In fact you see that some C# implementations of those are starting to appear.

In the past we used to say that this is because Java was slow and you cannot develop such complex applications on a slow platform. But we were wrong.

We were wrong for two reasons. First, because Java has never been really slow. There have been some parts of Java that were slow, but there has never been any doubt that those parts would rapidly improve as they were needed on the server side. I'm talking here about JITs, GCs, etc. This is where Java was prominent and had to improve at all costs for the language to survive.

Secondly, because of the nature of the platform, Java applications are always the first applications to take advantage of new hardware and OS's as they come to market. As soon as a JVM is deployed to a new system, without any compilation or tweak, your Java application will run there at full speed. You develop on an old 32 bit OS, you run it JITted at full speed on a 64 bit JVM on Windows 7 or Solaris.
If you are an end-user you don't even need to re-download the application from the developers site. This means speed not only for end-users and developers, but even on the front of the concrete execution performance of the applications. Today's JITs are great at optimizing your code at runtime to native instructions. This allows you to  exploit all the power that the hardware you are running on has to offer, a feature that statically compiled languages will never be able to compete with. A feature that would be a dream come true exactly for enhanced desktop applications and games if only... you could effectively employ Java to develop such applications.

Often we've heard that Java on the desktop has really never had any chance for the simple reason that Sun has always been a server-side company. With the Oracle deal this seems the natural way things will continue in the future.

Well, I hope this wont be the case. For the good of Sun, Oracle and Java itself I really hope that some prominent people from these companies start to understand that the lack ofgreat power and effectiveness on the desktop today is a sure path to a reluctance in the adoption of the Java platform as a whole, even on the server side, of tomorrow.

Why do I say this? Because of the evolution that we are seeing in the microchip industry at the moment -  the multicore paradigm. This is strictly tied to the market of desktop computers and small consumer appliances in general. Sure this paradigm will go, but it's on the desktop that we will see the most extraordinary things. Not only on the desktop as we see it today. Maybe it is worth mentioning that the small consumer appliances of today are the chips in our jackets, glasses and shoes of tomorrow or even under our skin. The desktop of today will also penetrate in the robots that will appear in our malls, homes, offices tomorrow.

All these electronic products will do things barely imaginable today but from a developer point of view you can already bet that it wont be enough to employ some development environment that offers you just a good windowing and a state-of-the-art 2D API mixed with some scattered 3d sliding, rotating or blooming effect here and there. What you will need is total integration of your application with all the processing power that the consumer hardware has on board and all the services implemented by the OSes it runs, without any compromise at all. You will need to process huge amounts of data and codecs, sounds, images, videos, and you will need to process them with parallel programming. Very often you will need to process them both on the client side and the server side. It doesn't require too much imagination to envision a  future in which a massive amount of client-side processing power is employed for complex data mining tasks once reserved to server-side monsters. For the execution of sophisticated searches inside images, videos, virtual 3D environments. For interacting with remote services that also require enhanced client-side capabilities such as gamining, medical analysis, e-learning services and remote conferencing.

We are used to companies that offer server-side solutions, to think that the future would be more and more processing power on the server and the client would always be just some sort of simple device to connect to servers, just a bridge to access the real powers. This scenario has proved to be dramatically wrong. The scenario that is clearly emerging today is that humans need massive amounts of processing power both on server-side and client-side. Projects like SETI@home are proliferating. Services are emerging in which you trade the power of your desktop or notebook CPUs/GPUs during screensaver time for financial investment tips originated by genetic and other heuristic search algorithms running on massive networks of connected Internet clients.

Everyone knows that for a hundred dollars you can buy a 1Tb hard disk today where such devices were affordable by very few in the past. A notebook with 4Gb RAM, 1Gb dedicated graphic ram and a GPU with 48 cores costs  just a few hundred dollars today. These enormous computational powers are here to be used. It is not necessary to imagine futuristic scenarios in which new strong AI agents across the world will finally put at good use all this power. It is enough to simply observe how well and rapidly weak AI algorithms are already finding a way to reach desktop applications thanks to the new powers of recent hardware. It is enough to just notice how the diffusion of Internet combined with the power of today consumer hardware is already changing our life in such a way that new kind of jobs are emerging. For example for those freelance artists that embrace their most important challenge for the future: producing and selling on-line digital content for both virtual and real worlds.
We are not talking here about some geeks that will never achieve  a consistent customer base for some potential product. We are talking here of literally tens of billions items produced by these people as you can clearly count by yourself on on-line retailer sites that allows users to upload images and create their own merchandise (clothing, posters, etc), or on stock photo sites, on digital art sites, on 3D content retailer sites, on independent music retailer sites, in 3D virtual worlds, etc. These people are all people that are using enhanced desktop applications to make their products, and use the next versions to create and sell even more content.

These applications are evolving to use the new multicore chips and related hardware and software technologies. And these applications are developed by the same suppliers that offer the sites and the selling infrastructures to the freelance artists and for this very reason these applications are often a mix of interfaces to server-side services and client side enhanced processing features. I think this is the real future of software applications. It is not a scenario with predominant server-side processing or predominant client-side processing. It is both at the same time. John Gage was right when he said "the network is the computer." But the crucial point with a network is that it needs at least two sides to work, one is not enough!

How is placed Java in this scenario? Java surely caught the server-side train, but it's may miss all those other important trains that could eventually even lead to Java predominance on the server-side.

My point is, why do I have to embrace two different technologies to develop the server-side and the client? Clearly for big companies and already well established businesses this is not urgent concern. They are used to working on integration problems as new technologies arise. But for new companies this becomes a crucial question. And the same can be said for those established companies that decide to migrate once and for all on a more uniform and modern platform. So on one side they will face a technology that has everything they need for server and client sides.
Sure its scalability could be argued as well as its server-side market adoption and multi-platform support but one thing for sure cannot be argued: that from a client-side point of view they run, on an extraordinary vast majority of consumer computers and devices. What we have on the Java front? We have widely adopted, strongly scalable, well designed, multiplatform, 360° server-side solutions, the defacto industry standard, but that's it. It's not insignificant, but it's incomplete. It's like having a Ferrari engine but no wheels or, worse, just some baby tricycle toy wheels here and there! You can't go that far with this configuration, believe me, you'd better choose a utility car and give up altogether the Ferrari engine.

It really scares me when I see how history repeats itself time after time. There is surely nothing new in the current situation we are seeing for Java. A visionary company invents something truly amazing, and the majority of the industry rapidly recognizes its effectiveness and adopts it and invests huge amount of time and money into it. Still an imminent and well foretold disaster, unseen by the main actors, is ready on the doorstep just because all of them forget to cover what a telco would simply call “that damn last stupid mile”.

That damn last stupid mile for Java is, and has always been, client-side. Namely it is: JMF, SwingLabs, Swing Application Framework, JOGL, Java3D and something new to be developed for OpenCL. And no, sorry, it is not enough to say that if this stuff is really needed open source communities will do it. We don't need it, you need it! We developers have always alternatives. It is you, whoever invested strong efforts, long time and huge amounts of money in Java,  that should be the first to be concerned for the future of Java on end-user computers and devices.

If you demonstrate to understand this, if you show to care about this, then yes, we are here too, we are going to stay. We are going to believe the "Write once, run anywhere" dream once again. And then yes, you can bet, a lot of us would be going to help you to let this dream come true,once and for all.

Published at DZone with permission of its author, Antonio Sorrentini.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


Armin Ehrenreich replied on Thu, 2009/12/10 - 7:55am

Really well said. I completely agree.
There is an urgent need for cross platform desktop application technology. And I do not think C++ with Qt is a good option. But I fear that this is a cultural problem. Most people of the Java community will not even understand what you are trying to say, so will most responsible people at Sun and I dare to predict that it will not change with Oracle as this is also a completely server side company.
Client side is done by Microsoft and Apple. Therefore their platforms .NET and Cocoa are getting tuned for desktop. Go for example to Cocoa forums and see the differences in culture. They talk of GUIs usability, responsiveness, how the end user approaches a desktop application and, and.... Recognizing those points, their platforms get tuned in order to tackle those problems.
Then go to Java forums and most people really believe that in the future all applications will be server side. They believe that it is good to have all your private and confidential data on some server you have no control of and that might even be located in a different country with different legislation. They praise Google and are completely blind to the many problems of server side desktop computing.
But desktop computing would need a lot of work for tuning. Swing has very, very slowly evolved to become an option together with associated APIs like Netbeans-platform, Java3D, JOGL and, and. But instead of improving their desktop option by adding a capable HTML browser pane, an option for displaying pdf, a revived JAI and media options suddenly someone at Sun decided to make a new start. This only demonstrates how little they understand desktop computing. They think, given their current situation, it is a good idea to imitate Flash with a new scripting language on the Java platform!? But with APIs that are only usable by this scripting language...

James Sugrue replied on Thu, 2009/12/10 - 6:01am

I agree, and I've long been a supporter of desktop development. I think there is some hope when we look at the projects available in Eclipse. e4 is in development at the moment, and provides a solution for the desktop or the browser. Additional concepts such as being a container for  gadgets is quite nice.There are other solutions available for good desktop applications such as Riena and RAP

But we do need to focus more on the desktop. JavaFX is a step in the right direction, but it would be really nice to see more enhancements in Swing and technologies such as Java3D/JOGL.

Osvaldo Doederlein replied on Thu, 2009/12/10 - 6:58am

I guess the state of JOGL's support is not that bad, because it is a dependency of the JavaFX Desktop Runtime (just check your JPI resource cache). In fact, I think you can write a non-JavaFX applet that uses JOGL and deploy it without requiring any permission for the native code - just hook your JNLP into Sun's signed JOGL distribution, and the JRE will fetch it if necessary, and run it without any security dialog.

Casper Bang replied on Thu, 2009/12/10 - 7:30am

It should probably also be mentioned, how JavaFX damanged this space. Not only did SwingLabs support suffer, but JSR-295 (Beans Binding) and JSR-296 (Swing App Framework) are now sadly abandoned. Sun appears incredibly bad at picking their battles and slow at following something through.

Armin Ehrenreich replied on Thu, 2009/12/10 - 7:48am in response to: Osvaldo Doederlein

Hope you are right, I have to try JOGL when JavaFX is installed.
But there are at least very bad signs at the wall (or the communication from Sun is as bad as it could be):

Jacek Furmankiewicz replied on Thu, 2009/12/10 - 9:22am

If only Swing didn't look so poorly on Linux, it may have been an option. Which unfortunately is way I am leaning more and more towards the SWT way.


Jeff Martin replied on Thu, 2009/12/10 - 10:03am

Right sentiment, though I have a slightly different take. The real issue is that Sun needs to eat it's own dog food and write some real desktop apps with Java. This would prove their commitment to Java on the desktop, prove that the apps can be written, and improve the frameworks and tools. I don't think another framework is going to help Java.

I've written a real desktop app with great graphics and performance - it's very doable. Now if I could just get them to incorporate some of my feedback into the JVM... :-)



Jim Bethancourt replied on Thu, 2009/12/10 - 11:06am

Hi Antonio,

While I don't do much desktop development, I share your concern. While I haven't used it, there is a pure Java web browser called Lobo:


Greg Brown replied on Thu, 2009/12/10 - 11:21am

Hi Antonio,

I share your concern about the state of Java on the desktop. I have been a fan of client-side Java for a long time but had become frustrated with the lack of a truly viable platform for building client-side applications in Java. That's why we created Pivot:

It is an open-source platform for creating rich internet applications in Java. It may not address all of your concerns and objectives, but might be worth a look.


Jay Huang replied on Thu, 2009/12/10 - 11:35am

Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}

Very well said.  We need to see some Swing improvements. It's sad to say that we still don't see the 'typeahead' feature of JFileChooser in Swing after all these years. Java is not slow on desktop and Swing is not ugly. As matter of fact, Swing is probably most flexible GUI toolkit. It's up to us, the developers to make our apps look good.


I think that Sun did want to see desktop applications in Java, which was the hot topic a few years ago when those good GUI developers were still with Sun. But then everything was changed when JavaFX came along. The desktop developers left Sun since they didn’t want to bet their future on JavaFX and since  they don’t like to see that all the attention was put into JavaFX.  Up to this day, Sun still wants to put Java applications on desktop but they just don’t have the resources. All the remaining resources are being put into JavaFX development.  I don’t even get any response any more when a bug report is filed these days.


JavaFX is moving very slowly but it’ll never be able to compete with flash on the Web.  Sun is now trying to put out Java Store. I don’t understand what they are trying to do there. Publish JavaFX desktop applications, maybe?   Comparing with JavaFX, Java Swing is far more capable for developing desktop apps and much faster than JavaFX.  The status of Java on desktop is bad enough.  Java Store might further damage that status if Sun does not do it right.  I don’t see many real desktop apps in Java Store other than some Java games, which are not compelling desktop applications.   A leadership change is needed in Sun if we ever want to see Java on desktop.




David Lee replied on Thu, 2009/12/10 - 1:02pm in response to: Jim Bethancourt

This is a project, every java developer should be interested in.  Thanks for posting.

Jilles Van Gurp replied on Thu, 2009/12/10 - 1:39pm

The truth of the matter is that Sun never had that much competence on the desktop side and solved related requirements in Java mostly by proxying existing solutions (directx, opengl, windows theme engine, media frameworks, etc.) but ever failing to add much value. Mistakes were made in the process and at no point in time Java was the best solution available for what I would call high end desktop oriented computing. Sure, if all you needed was a shitty frontend for some stupid database application, migrating from vb 6 to some swing based solution was probably going to be an improvement. And definitely some cool applications succeeded in niche domains. But otherwise, there were always better performing, more easy to develop, use and deploy, alternatives around. I don't believe that this is due to any inherent technical issues, but just due to a combination of indifference, incompetence and  ignorance on the side of those who were supposed to do the heavylifting in terms of coming up with the required technical solutions and getting those deployed in some .x increment of the JVM. It just never happened and Sun would half patch some of the problems in the next iteration of the JVM. Desktop Java has always been clumsy at best.

 JavaFX is just the latest incarnation of Sun failing to grasp what really mattered here. They launched it with some extremely crappy demos that did nothing but demonstrate their incompetence and total lack of qualifications to push anything in this domain. In the process of Java's evolution towards JavaFX, things actually have moved forward a lot, which I guess is the frustrating aspect for a lot of client side developers: too little too late. So we have improved garbage collection, pretty decent integration for 2d/3d graphics, printing, clipboard, font aliasing, etc. But damn, it sure took a shitload of time to get there. Overall, Java is not a serious consideration for any client side development these days unless your main expertise happens to be Java related (which IMHO would somewhat disqualify you as an expert on the subject).

Guido Amabili replied on Thu, 2009/12/10 - 1:46pm

To quote the orginal poster whose post is very well written and a heartfelt complain (IMHO) "First, to those that doubt: there are a lot of problems with Java on the desktop. I admit that there have been big improvements even before JavaFX such as the improvements with Swing (maybe driven at that time by the competition from SWT).".

I do not understand why people are bashing JavaFX again.

I wouldn't like to develop in Flex so I am grateful Sun did something for us Java (Desktop) developers.

Sure , there are still many problems, but Sun doesn't have the man power to bring forward Swing right now, that's true.

I do not know what will happen with Swing, the toolkit number one for java applications, but as there are many applications relying on that toolkit, it's not going to disappear.

How should Swing evolve ? Maybe with new Java7 proposed features we will see something for ol' Swing.

As one of the poster said, maybe the problem is not with the toolkit, but not every one is capable of building a killer application.


Dimitris Menounos replied on Thu, 2009/12/10 - 3:45pm

@Antonio Sorrentini

I am not sure I feel bad about Java's failure on the desktop. I think it kind of deserved to fail because it was never designed for efficiency first and foremost. Contradict that with Google's developments such as Android, GWT and Chrome, that have "fast, responsive and seamless" at the heart of their design philosophy. I am glad that Google decided to by-pass Sun's runtime and go with their own innovative architecture.

 @Jilles van Gurp


Peter Karussell replied on Thu, 2009/12/10 - 3:43pm

One of my chums is developing a 3d modeller in Java called moonlight 3d.

But of course I would like to see more investments into Swing these days of Sun. Especially in stuff like remote GORM or pivot or spring rc or griffon or what else ...





JeffS replied on Thu, 2009/12/10 - 3:53pm

ah - the usual scapegoat.

I for one am glad that Sun had the vision to see that they can't simply concede the RIA market, and that they need to continually evolve the Mobile market (JME by itself will become a dinosaur without innovation), and to make their client side more designer friendly.  These are all things that JavaFX is designed to succeed in, and frankly, from what I've seen so far, it's getting there nicely.  It still needs some work, but progress has been good.

Unfortunately, Sun's been losing money, and has overall been a dying company, for quite some time now.  Thus, they are dealing with limited resources.  One of the victims of cuts was Swing Labs.  But alas, that is open source, and does not rely entirely on Sun's money.

You could argue that Sun's allocation of resources toward JavaFX has taken away from general Swing development.  To a certain degree, it probably has.  But we have seen improvements in speed, size (download size of the consumer JRE), look and feel, and the overall APIs.

But at the same time, Sun simply could not sit on their hands and let the RIA market, as well as the Mobile market, slip away.  They had to do something.

And maybe when the Oracle acquistion of Sun finally goes through, there will be more resources available for all client side Java - JavaFX, Swing, Java 3D, and others.  Early indications are that Larry Ellison does see the importance of a strong client side play, because, as this article points out very well, it helps supplant the whole of the Java ecosystem, and helps spur on the server side.  Even though Oracle is primarily a server side company, I believe that Larry realizes the importance of the client side.

Psique replied on Thu, 2009/12/10 - 4:45pm

And I want to also add, that I'm guessing the embedding video feature will be really painfull.


Nmatrix9 Nmatrix replied on Thu, 2009/12/10 - 6:04pm in response to: Greg Brown


I want to thank you and Todd for starting the Pivot Framework.  I too have become frustrated with the utter incompetence shown by Sun when it comes to client side technology.  They always seem to do more fluff than stuff nowadays.  Anyways like the article hinted at, it's not a matter of SHOULD Java have a kicka**, easy to use, extremely powerful, extremely fast gui framework, it's more a matter of it MUST have such a framework.  Because as it stands now, in about 5-10 years MicroSoft's WPF and .net client side frameworks will be a serious contender to the mindspace that Java once reigned supreme.  Because they'll have a rock solid ecosystem of BOTH client side and server side technologies that unify all aspects of the development cycle.  When that happens don't surprised to see a huge exodus of Java developers jumping over to the .net side.  JavaFX is nothing short of a huge disappointment those guys who were steering the ship at Sun are in my opinion complete dumba**es.  I'm also not too excited by Oracles response in terms of supporting JavaFX, because lets face it Oracles whole philosophy and cultural DNA simply does not have that magic to create the next inspirational and innovative GUI framework.  But thankfully, the Pivot framework gives me hope that given enough support it could seriously be the next mainstream client side RIA framework for all occassions and also seriously kick some a**.




Cloves Almeida replied on Thu, 2009/12/10 - 7:21pm

Why not picking up QT Jambi (QT bindings for Java, deprecated by Trolltech)? QT4 is open-source, is great and has all those features. It's not "pure Java"? So is SWT...

Bob Lebel replied on Fri, 2009/12/11 - 8:11am

Agreed about qt-jambi. I have been using it for a year and it's amazing. Webkit, css, superb api, super stable. Could never go back to swing. It's not supported by nokia anymore, it's now open-source and the community is very small. Some peoples are working on the 4.6 version. My hopes : that jambi remain well maintained, or that e4 catch up to it. Swing? A thing of the past...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.