views:

547

answers:

6

I am writing a desktop application written in Swing developed using Java 1.5. Some of the users seem to be using Mac, but I am interested in Java 6's scripting feature (Java 6 ships with Rhino). Java 6, although it came out almost 2 years ago, doesn't seem to be widely in use. I also hear Apple ships Java 6 only for Intel 64 Macs only. Is Java 1.5 the last Java that runs everywhere?

Is Java 6 ready for end-user desktop application now? If not now, when?

Edit: Don't get too hung up on the fact that I am using Swing. I would like to know when Java 6 can be considered ready for prime time, not the choice of UI library.

+1  A: 

Java 6 is not officially out for all Macs yet. If you want to be more widely accepted, go with 1.5 (5).

jjnguy
You say 'yet'. Do you know if Apple has plans to ever release Java 6 for 32-bit Intel Macs or for PowerPC Macs? I was under the impression that these machines would never get Java 6 from Apple.
Dan Dyer
A: 

From what I can tell most of the really successful Java desktop applications aren't using Swing. It's gotten much faster, but most people want their windows to "look native", and Swing just isn't good at that. If you are intending a real "professional" looking end-user application, you may want to take a look at the Eclipse Runtime. It's used by the Eclipse application, and Azureus to render native-look-and-feel windows for a user.

Of course, it's hard to find a good tutorial on how to write for the Eclipse Runtime, at least in comparison to the proliferation of good example code, books, and tutorials for writing Swing applications.

Java 6 has been out for almost two years now... It's stable enough for development, though for some reason, as other posters have pointed out, the Mac version isn't here yet.

Adam N
I think you have a good point, but it doesn't answer my question. When is Java 6 ready? The feature I am interested in Java 6 is scripting.
eed3si9n
I've edited and updated the Java 6 portion
Adam N
IntelliJ is entirely Swing and looks the same on all platforms, something SWT isn't very good at. ;)
Peter Lawrey
The point of SWT is not to look the same on all platforms, its to look the same as the native platform apps on each platform. It does a pretty good job of that.
Adam N
+5  A: 

As far as I know, it already is, and has been for some time now. Swing's just fine for writing native looking apps.

It is true though, that if you are targeting older Macs, you'll never be able to use Java 6.

Are you asking about Java 6 Update 10 (AKA, the consumer oriented JRE)? That just came out, and is unavailable for Macs yet, but I don't think that should affect you, really.

Jack Leow
A: 

The speed of availability of 1.6 on Mac is an Apple issue (this has much more to do with politics than 'readiness'). If scripting support embedded in the JVM is a requirement, you'll have to wait to get that support on Mac. Or you could just load the Rhino library with your distro and use it... Here's the reference implementation - I'm not sure how much of JRE 1.6 is required for them to run (probably not much, if nay) - https://scripting.dev.java.net/ Gotta love the JCP :-)

Note that while Rhino is shipped with Sun's implementation of JRE 1.6, it's not part of the JRE standard, so it's quite possible that Apple won't choose to include it in their distro.

If this is the only thing from 1.6 that is holding you back, don't let it. Java is absolutely ready for the desktop, we have several product lines that are Swing apps.

Kevin Day
A: 

Java 1.6 is great for the desktop. I don't know what Apple's problem is. I'm just not supporting Macs anymore until Apple can get their act together.

Brian Knoblauch
A: 

As the top answer says, Apple's version of Java 6 has been available for Mac OS X 10.5 since April 29, 2008. (It can be downloaded here.)

Rhino is unfortunately not part of the package, though.

Dag Høidahl