“A few months ago OSNews reported that the next version of Java (code name ‘Mustang’) will feature native GTK components for the Swing API. This got us excited since, quite frankly, Swing’s GTK look and feel has always been quite dissapointing. We downloaded the latest release candidate of JDK 1.6 to see how well the Swing GTK look and feel looks, we were quite pleased with what we found.”
Looks pretty good.
It doesn’t just look good. It is also significantly faster than Java 5. I tested it a couple of weeks ago and I would estimate that it is about 25% faster.
As the code is not even in beta stage yet, I would guess that there are a lot of debug code to slow it down, so it will be really interesting to see how the final release will perform when it gets out by the end of this summer.
Another good thing, is that it finally handles non US keyboards on Linux. This have hindered using java for cross platform desktop applications for a long time. Good to see that it is fixed.
I have come across comments at various forums saying java is passe. That the next big thing is Ruby. Now I am no programmer but it is clear for all to see that Sun has a big head start over other competing technologies out there including microsoft C#. For one, java has a huge programmer / developer base which in my opinion is one of the strengths of any programming language.
Replacing Java with Ruby is really a non-starter issue since there is only a few places where both languages fit naturally. Sure, you can shoehorn any language into doing anything: they are all Turing-complete after-all.
That said Java has great libraries, large programmer base, many available tools, and the language itself is a joy to work with. Sure for hacking it may not be the most pleasing but I’ll take a Java compiler error over a G++ compiler error (those things, beyond telling you the line number -though not always, are useless), and a stack trace over a core dump any day.
I think the biggest place people talk about replacing Java is web pages with RoR: but web pages are such a broad topic that it really depends on what you are doing on the back-end as to what is appropriate.
I think anyone talking about languages replacing each other, especially if they are unrelated, are trolls. After all, LISP is still in regular usage long after having fallen out of popularity.
I think people who think Ruby will take over Java are smoking crack. Think about all the software and all the corproate apps running on Java…think of all corporate prodcuts and so on that are released purely written in Java. Ruby is a scripting language isnt it? It does not even have the power that Java brings to the scene. There is .NET and there is JEE and nothing else. Imagine trying to write an enterprise web based app using Ruby. Good luck to you! I think Ruby is good for all areas that Java is not good in. Namely desktop apps for end users but that is changing soon and I think for the better with Mustang’s release.
“I think people who think Ruby will take over Java are smoking crack.” haha I totally agree with that; however as too “There is .NET and there is JEE and nothing else.”, you are being too simplistic. I would correct that to say: ” There is .NET, JEE , GCC, Intel C and nothing else.” Becuase that is more or less true.
Is it not J2EE ?
Or is there something called JEE that I have missed?
actually sun renamed it from j2ee to java EE…but many people i know refuse to use the “new” name…
There is .NET, JEE , GCC, Intel C and nothing else
Wrong:)
There are byte-code interpreters(.NET, J2EE) with JIT, interpreters and then there is native executable where you at least poses possibility to control your code in manners of memory and performance control.
/*In my case, heavy duty real-time HPC*/
Both .Net and Java are either memory hogs or performance disasters. But to be truthfull, in lot of ordinary cases problems are actualy acceptable and almost not noticeable in typical computer tasks. I even use mono to write simple desktop tools. C# is nicer to write in my opinion and mono is way nicer to deploy.
I was talking here few times about problems with memory consumption in Java, where people were persuading me how java rules. Well, after following their examples how to get rid of memory problems I got performance disasters instead. It is either one or another. .Net is not better either. Yes, I run directly and with server. Yes, I tried memory parameters. Yes, I tried GC control. It is just one problem solved, another gained.
Please, no trolling about benchmarks how Java is faster than C. It’s not. As soon as complexity oversteps typical Java or .Net usage they become unusable in HPC.
Edited 2006-02-12 19:05
Actually, it’s more accurate to say if you ignore the SQL, HTML, JavaScript, and XML languages:
“There is .NET, JEE , GCC, Intel C/C++, and every-thing else”.
While .NET, JEE , GCC, Intel C/C++ are the big guns in the corporate world, they are not the only game in town. If you peer into any company, you’ll find clusters of VB, Perl, PHP, Python, Ruby, shell script. macros, home brew languages, and vendor specific languages. Some languages are the standards of groups within the company, but few are company-wide standards like JEE and friends.
I highly doubt ruby is a line parsed scripting language (what most people think of when you say scripting). I’m sure it’s probably much like Python: A byte-compiled JIT language that interprets a special non-text format for the program.
Most scripting languages are vastly more useful than they’re given credit for. Even Common Lisp can be interpretted, and thereby called a scripting language.
I heavily doubt Java will make a good desktop programming language anytime soon. It’s simply unresponsive, and I doubt that replacing the current drawing scheme with gtk based drawing engines is going to make it more responsive.
Things like python, ruby, mono/.net, and plain old c/c++ are still better for desktop applications.
If anything, SWT probably should have ushered in the grand new age of Java desktop apps. And it brought a few in, and will continue to.
And Ruby for webspace is called Ruby on Rails. I’m not even a Ruby fan and I know that .
Anyway though, it’ll be nice to have less ugly Swing apps on *nix. The current theme is a vast improvement over metal!
As for Java’s unresponsiveness, you may want to take a look at this blog – http://weblogs.java.net/blog/opinali/archive/2005/11/mustangs_hotsp… It discuses improvements to the Java client JIT, which is most often used on desktop apps. Java 6’s client JIT is significantly faster than Java 5’s (58% for this benchmark).
This blog entry – http://weblogs.java.net/blog/campbell/archive/2006/01/400_horsepowe… – discusses improvements in Java 6’s ImageIO library. There was a 53% improvement in some benchmarks. Java 6 looks like it will be very nice for desktop apps.
Edited 2006-02-12 23:39
What I find funny is that Java supporters always tell us that Java is performing correctly on the desktop and yet you show a massive performance increase in this new version.
And massive performance increase usually occur only when the program is immature..
But whatever. Does this version support all GTK engines? I believe Java 1.5 only supported default, industrial and bluecurve and probably a few more.
Edited 2006-02-12 17:24
I second that, 1.5 doesn’t support clearlooks! Most people I know use clearlooks, thats crazy. Also even if i switch the engine I get a null pointer excep. comming what what looks to be metacity related… as anyone seen this? I of couse tried a bunch of combinations, include basic.
I’m the admin for that site, it is back up now. This article was linked to from the front page of Digg and the server has been taking a beating today.
In any case yes, Mustang supports all GTK engines, I didn’t post screenshots of all of them since I didn’t think it was necessary (besides, with the digg and now OSNews effect, the site has transmitted over 5 gigs of data today).
I had to lower the quality of the screenshots since I don’t want to get hit with a huge bandwith bill this month. Apologies.
Yeah, it supports all engines by getting GTK to do a lot of the drawing itself. I use the QtCurve theme myself, something totally unsupported by Java 5, but in Mustang all my Java apps (even NetBeans), worked great.
Personally I think Java 6, Java EE 5 and NetBeans 5.5 are going to blow the socks off the rest of the market.
Java EE 5 in particular is going to be good, they’ve had a look and Hibernate, XDoclet and C#, and they’ve taken the best bits of each. There should be almost no need to XML desciptor files anymore, everything will just be annotated.
This is what is going to keep Java on top for the forseeable future. No other language has a comparable infrastruture for hosting enterprise applications.
somebody know if there are something to get native Qt component for the swing API
because if found gtk component so so, just look a dialog box (firefox, gimp……..)
A few months ago, OSNews ran a small story on this article I wrote:
http://www.ffnn.nl/pages/articles/java/java-2-se-6.0-aesthetics-pre…
Is it just me or is the article presented here light on details and on screenshots?
Anyway, good job on bringing up the subject again. Java is getting closer and closer to looking native on GNOME.
I have done very little java and/or Swing programming. I think basicaly the consept behind Swing, same GUI api regardless infrastructure (OS/Windowsmanager) is not usful in most cases. Its only usful when portability is critical and GUI/Userinterface is of low importance. But for most application portability is not of such great importance and GUI/Userinterface is of real importance. And to make swing exactly like as native GUI (GTK,GDI and many more) is impossible, it would lead to a huge API bloat and the support cost for SUN would be astronomical.
Please, give us all a break and realize that you are not the infallable expert coder that you make yourself out to be. There are many Java applications both server and desktop-side which perform well both for memory use and general performance. That you have failed to do one or the other does not indicate that the language is at fault.
Perhaps you need to take a programming course or study course specifically for Java. Then after a few years of experience, you will probably be qualified to talk on the subject.
They have got the implementation of the GTK theme widgets right and it looks like they have done a good job there. But the font problem is still there. The fonts in the Java application just don’t look as good as those in the screenshots of the native GTK2 one. This is a serious problem with the current GTK emulation in Swing and it looks like the problems continue in Mustang.
One of the nice things about SWT applications running in Gnome is that the fonts are identical to native applications.
Have you used Eclipse ? It’s the best “multi platform” IDE written in Java using native rendering on each platform (Win, Linux & OS X). It’s blazing fast cause of this. I don’t really know why Sun didn’t adopt this as the standard widget toolkit for 1.6 and threw away Swing.
There are some Visual Designers for SWT that made the hole GUI building a pleassure!
believe me .. have a look at it! http://www.eclipse.org/swt/
Here we go again.
Have you used Eclipse ?
Yes
It’s the best “multi platform” IDE written in Java using native rendering on each platform (Win, Linux & OS X). It’s blazing fast cause of this.
I don’t know what kinda machine you’re using, but Eclipse is anything but blazingly fast. On OS X, I actually prefer Netbeans and the Swing UI. They feel faster to me, on my Powerbook.
I don’t really know why Sun didn’t adopt this as the standard widget toolkit for 1.6 and threw away Swing.
Perhaps it’s because there is very little that SWT brings to the table? The native looking widgets are nice, but Swing is improving on that area. The only place that Swing is behind in SWT is in using native fonts. This is also being worked on.
Of course, this doesn’t bring up the problems with SWT. With SWT, you’ve removed Java’s ease of distribution (one binary, all platforms). Compare Eclipse and Netbeans. With Netbeans, you can just download one zip file and that works on any machine with a Java 1.4+ VM. Eclipse on the other hand, you’ve got worry about what platform you’re running on, and if SWT exists on that platform. This is reflected on the Eclipse download page. If you’re going to worry about such deployment issues, why not just write your code in C++ and use wxWidgets or Qt?
There are some Visual Designers for SWT that made the hole GUI building a pleassure!
You’ve got some perverse sense of pleasure! The VEP sucks majorly and is unusable on most platforms due to it’s sluggishness. I have found no one(including Eclipse evangelists) who claims that the VEP is a pleasure to work with. There is Jigloo, but that doesn’t allow me to design Swing apps on OS X so it’s of no real use to me.
Ever tried Matisse? Try it, then come back and say that Eclipse has better GUI building tools.
Can’t believe I’ve replied to an off topic post…. ah well.
Before using uTorrent, I had Azarus (Java/SWT). The UI was responsive but it’s a resource hog and take forever to start up.
Well, I was using it too before I start using uTorrent. It only gives you a hint that beyond java memory consumption issues, you can build a really snappy application with SWT that blends really good into the OS.
And for the “netbeans” guy, I’m giving it a try right now and it’s really good (Matisse it’s great, very close to VS.2005 Express) but not as snappy as Eclipse!
I don’t really know why Sun didn’t adopt this as the standard widget toolkit for 1.6 and threw away Swing.
A little off topic, but this is because of the nice relationship between IBM and Sun. As you probably know, IBM is a heavy contributer on the Eclipse platform (their new versions of Rational Software Modeler/Architect are based on Eclipse). Also, rumours have it that the name “eclipse” was not chosen at random
I’m forced to develop in Eclipse for some of my projects, and end up spending at least 3 hours a day in it.
And while I find Eclipse’s plug-in support to be great, I am always floored when I hear people call Eclipse snappy!!?!!? I develop in Eclipse, Netbeans, and JDeveloper, and I have never found Eclipse to snappy. It is IMO slower then any IDE I have ever used.
Which version of Eclipse are you using? 3.1 is faster than 3.0 by vast amounts.
I’m using 3.1.1 on Windows XP, and 3.1 Linux and OSX. I have a celeron 2ghz with 1gb of ram, that I dual boot to run Windows XP and Linux. My Mac is an iMAC 1.7 single core with 1gb of memory.
On the windows machine Eclipse and Netbean are pretty close in speed for general tasks (I am a J2EE developer). My feeling that Netbeans is faster mostly has to do with the fact that Eclipse’s workspace refreshes (I may as well get coffee when this happens), are very resource intensive, and block some operations in the IDE.
On Linux and OSX I don’t even feel like it is a contest. Netbeans (on Linux and OSX), and JDeveloper on OSX, beats Esclipse hands down on my systems.
I like many things about Esclipse and like I said in my last post the plugin support is awesome. I also do all of my RoR development in Eclipse and find its subversion support (via tigris) fantastic. Just don’t tell me it is snappy.
Edited 2006-02-13 17:50
OK, agreed. Eclipse is by no means snappy, it’s just that I’m spoiled with an overclocked Athlon X2, hence the performance treshold is passed and I don’t really notice Eclipse being slow at all. It even starts in 4-5 secs!
Often I am not at home, though. The solution? Remote Desktop
OT, i know, sorry …
Well, it’s of course slower than Visual Studio 6, Delphi, etc. But I found it to be much snappy than NetBeans 5, IDEA 5 and some others. On those others, the GUI feels “heavy”. Of course it’s a totally subjective opinion.
btw, I’m using eclipse 3.1.2 on win xp and my specs are far from high end: AthlonXP 2200, 512RAM, XP SP2.
For future reference, I think it’s generally accepted that screenshots should usually be .png files. I always cringe when I see screenshots as jpegs…
The only exception I can think of is if your screen (at the moment the shot is taken) contains photo images (like a picture taken with a camera).
The reason for the jpegs are explained at http://www.javalobby.org/java/forums/m91990736.html. It looks like his site was OSNewsed
Look at the mustang_clearlooks/native_clearlooks pictures side by side. The fonts, tabs and buttons are clearly different on the two shots (i’m not talking about the jpeg compression issue here).
Anyone can tell me why they are claiming native gtk2 rendering while it clearly isn’t? Especially after listening to all their critizism for years about SWT being on the wrong track?
The argument between SWT and Swing is endless.
However, If L&F is not important for GUI application, why they tell such a lie on native gtk2 look on Java 1.6?
Yes, Swing is flexible.
However it’s two-layer hierarchy is messy.
It must take OpenGL for Hardware acceleration.
It must take themes for better L&F consistency.
It still need more work on Fonts display.
Currently Desktop PCs have enough Hardware & Computation support to overcome these issue.
But these issues still exist on Handheld/Embedded environment.
Under such condition, OpenGL and Themeable UI is not available.
Yes, Maybe SWT is slow without integration with JVM.
However, it’s features is better and more critical for UI application.(L&F Consistency…etc)
On Desktop, SWT is ported to Windows/WinCE/Linux/Solaris/QNX/AIX/HP-UX/MacOSX.
Even Sun’s J2SE is available for Windows/Linux/Solaris.
Since SWT makes use of native UI framework.
SWT for Handheld/embedded system is more responsive than Swing.
And it looks more better than awt/swing.
SWT works fine with J2ME. Under J2ME, only poor awt support is available.
SWT is indeed a better idea than swing.
And SWT is more pratical for GUI program than swing.