Posted
by
Zonk
on Sunday September 23, 2007 @01:07AM
from the something-thoughtful-for-saturday-night dept.

An anonymous reader writes "While the Java development environment is fully integrated into Mac OS X, the Eclipse developer IDE brings a fully integrated Java development environment to Mac OS X that provides a more consistent and easier to develop cross-platform experience. This article shows you how quickly you can be up and running with Eclipse and Java development on the Mac. 'Whether you're a Mac OS X Java developer working on cross-platform Java projects, a Linux developer switching to Mac OS X because of its UNIX-based core, or a general Java developer looking to develop applications targeted to Mac OS X, you'll want to look at the Eclipse IDE because it provides a solution to each of these development needs. While Mac OS X provides Xcode as its primary Java development IDE, Eclipse provides a more robust cross-platform development environment, with application frameworks for reporting, database access, communications, graphics, and more, and a rich-client platform framework for building applications.'"

This announcement confuses me. Doesn't the fact that eclipse took so long to be ported to OS X indicate deficiencies in java as a cross platform language (assuming that I am rembering the facts correctly, and that eclipse is written in Java)? I mean if cross-platform development in java was a snap the fact that eclipse was ported wouldn't make headlines now would it (and would have been done a long time ago)? Of course simple applications might be easy to port in java, but Eclipse seems to be targeted at people working on complex applications (otherwise you wouldn't need all that overhead).

Oops, my bad for operating on the assumption that the fact that it was a slashdot headline implied something more than that ibm passed some money under the table for a not-so-subtle advertisement. You can see how I might be confused.

Another question: why does everyone assume you need an IDE, even for simple lab assignments?

Just a wild guess: Because there's too many CS and IT graduates who don't know how their favorite magical IDE works under the hood. They think it's über-complicated and scary to do development in a terminal using emacs/vi/nano and make/gcc/etc. Some of them have graduate degrees, and some of them teach.

Something you don't seem to be considering is that this guy who you believed to be a hot Eclipse guy might not have actually been so hot after all. Eclipse shouldn't have forced you to change anything, and if you did, oops.

as a java dev, i can tell you my favourite feature of eclipse: no hidden magic.

all the concepts are the same once you have the ide up and running: you tell the compliler part of the ide where your source directories are, you point it at the libraries that you want to include on the build classpath, and it just compiles them into a directory.

change a file, it auto-compiles and spits the.class into the designated build directory.

then theres the added niceties of a really easy to use debugger, as well as the hot code-replace which lets you hit a break point mid way through a method, change some code _while the debugger is still running_, have it pop the stack back to the top of that method and step through the new code that you've just fixed.

try doing that with vim!

and of course all the readily available plugins to extend the function of the ide, a really clean UI, and make it completely free, and there you have it. when i was a boy, it was all Makefiles in each package directory hand crafted with a master Makefile descending into each subdirectory to complete a build. *shudders with the memory*

other ides, while also providing at least the bulk of the above, often tend to do things with hidden side files ( all of them have their own project metadata files ), or just 'automagically' do things for the user, but often this is to the detriment of not letting the developer understand what is happening as they write up their code.

Eclipse isn't just written in Java, it also requires installation of a non-standard widget library called SWT. SWT is not part of the Java framework. It's SWT that would have held up any porting of Eclipse in the past, though as others have noted, Eclipse and SWT have been available for the Mac for years despite the implied suggestion that it's something new.

SWT is one of those things that is technically better than the alternatives in some respects, but ultimately the worth of adopting it is seriously open to question. Eclipse is oriented towards using it in place of AWT and SWING, the standard Java widget libraries, which in my view somewhat undermines Eclipse's usefulness as a Java development environment for certain types of application. Still with 90% of Java, in my experience, being used on the back-end, where no GUIs are ever developed, it's still very relevant and for many people will be a strong alternative to Netbeans.

Now admittedly I am not a Java Programmer, I am however a programmer, and as I understood Java's ENTIRE purpose in life it was to be a "Build it once, run it everywhere a JVM existed" environment where no platform dependencies existed.

There was no porting of your applications, there was simply copy it over there and it just ran. Things like SWING, AWT or whatever they call the framework this week, made sure that a java call for say an "About Box" was translated the the native UI engine for whatever platform it was running on. The programmer didn't have to even think about it, just call it.

So WHY does anything written in Java have to be "Ported"? It is because, at least in my opinion, Java has failed miserably at the most promising goal it aspired to.

Most Java apps are reasonably well behaved, the performance of most, well the best that can be said is that it is adequate but they just gulp resources like no tomorrow.

One day I will re-visit Java and see if it is any closer to its vaunted goal, but for today, it is at best "OK" for doing non GUI server side stuff, but for real GUI applications where the user experience really sells the application, I will stick with other tools that truly understand the notion for X-Platform.

The reason I can't use a Mac is that1) it still does not support java 1.6 because Apple chooses to bundle new Java versions with new OS versions instead of distributing them separately like the rest of the world does. In practice that means there's up to 1 year or longer (as in this case) before new Java versions find their way onto the Mac.

Thas wrong, you can download Java 6 from "http://developers.apple.com"

4) eclipse has a long history of compatibility issues with Apple's Mac OS X UI Java bindings in their native code for SWT (i.e. this is a C portability issue, not a Java portability issue). It sort of works now but is not quite ideal.

That is only partly right, yes it had issues, but since 3 years Eclipse for Mac is more or less released simultaniously with the other versions.

Things like SWING, AWT or whatever they call the framework this week, made sure that a java call for say an "About Box" was translated the the native UI engine for whatever platform it was running on. The programmer didn't have to even think about it, just call it.

AWT translates to native UI - poorly. (It has a truly ridiculously small subset of widgets - menus, buttons, lists, checkboxes, windows, and that's basically it.) Swing includes an overly complicated theming system called "pluggable look and feel" which in theory can be replaced with native widgets but in practice uses a theme that almost - but not quite - looks like the native platform. I think Apple created an actual Swing/native bridge, so Swing under Mac OS uses really native widgets, but Swing generally doesn't.

In any case, Eclipse figured "we could do better than that" and created the SWT, a widget toolkit that actually does map to native widgets. Unfortunately they did it in the most ass way possible, leaving developers to worry about things like the message loop and "the UI thread". In any case, this is the part of Eclipse that has to be translated to the native OS.

So WHY does anything written in Java have to be "Ported"? It is because, at least in my opinion, Java has failed miserably at the most promising goal it aspired to.

And there's that too. Even without the native UI library that Eclipse created, you still have to test on all platforms to make sure that you're program isn't accidentally supporting some quirk of an OS. That can be things like case-insensitive file systems where the program was unintentionally requiring case-sensitive. It can be doing things that work under some platforms but not others related to file I/O and the like. (I remember a really annoying bug causes by misusing dialogs as windows, that only occurred under Mac OS since Mac OS expected them to actually be dialogs.)

for real GUI applications where the user experience really sells the application, I will stick with other tools that truly understand the notion for X-Platform.

There is only one way to do cross platform GUIs right: don't. Create a native GUI on each platform and hook it to a core library that is cross-platform code. Anything else will not work.

I have to agree with the parent. Is using Eclipse on Mac OS X, something you could easily for 3 years, really news? I mean hell, I've been writing Java for paying gigs on a Mac for three years now--right when I got my first PowerBook. This article doesn't even describe anything new. Maybe this is all revolutionary for XCode users, but there aren't that many XCode Java users on the Mac. Even WebObjects uses Eclipse.

So where the heck is the news here? You might as well post an article about how Linux is a great platform for C development.

This is article is almost a big "duh".

Now what *would* merit an article is if MyEclipse and the Apple Java team buried the hatchet and fixed MyEclipse so that it worked flawlessly and with every feature it has for Windows and Linux. Right now, Apple says it is MyEclipse at fault and MyEclipse says it is Apple at fault. I was in two separate Java sessions at the WWDC where people basically asked Apple flat out to just get it working, no matter whose fault it is. If MyEclipse worked completely on the Mac JVM, *that* would be news for nerds, stuff that matters.