According to Hoyle...
Cross-Platform Software Development from a Macintosh Perspective: Java Development Environments
Last year, we began our series on cross-platform software development for the Macintosh, covering a number of development environments and frameworks:
In this month's column, we review the state of Java compilers and IDE's for the Macintosh developer.
Java: The Preeminent Cross-Platform Development Platform
Unless you have spent the last 10 years as a prisoner of Azkaban, you have no doubt heard of Java. Developed by Sun Microsystems to be an object oriented language loosely based upon C++, Java has quickly grown to be one of the most popular programming languages. With built-in garbage collection, Java sheds C++'s pointer weaknesses of memory leaks and access errors. Most importantly, the designers created the Java Runtime Environment (JRE), allowing Java applications to run on any platform that supports the JRE.
It is important to remember that there are two sides to Java: the front end Java programming language, and the back-end Java byte code which runs in the JRE. Although they are typically found together, there are commercial packages in which they are separated. For example, Microsoft's Visual J# development environment compiles the Java programming language into the .NET intermediate language instead of Java byte code; a reverse example is Axiomatic Multi-Platform C (reviewed last month) which compiles the C programming language into Java byte code. A more insidious example is the now defunct Visual J++, Microsoft's Java compiler, which failed to be fully cross-platform (many apps it created ran only on Windows). In this article, we shall review only fully compliant Java development environments, both front end and back end.
Free Java Compilers
Not all Java compilers are created equal, at least not from a Mac OS X perspective. Sun provides a free Java compiler called javac, and IBM provides a highly optimized one named jikes. Each of these, however, is a command line interface compiler and thus requires you to run it inside the Terminal application. Although they are both good compilers, console applications do not provide an acceptable Macintosh user experience. Fortunately, Apple comes to the rescue here with Xcode, the free IDE that comes with Mac OS X. Xcode can wrap either javac or jikes, allowing you to build Java applications. With its code completion and enhanced debugging capabilities, Xcode is an excellent platform for Java development on the Mac. However, because Xcode itself is Mac-only, the only way to debug Windows or Linux is through remote debugging. This is a less than optimal way to develop cross-platform code.
Commercial Java Compilers
With the number of high quality freeware options for Java on the Mac, the need for a commercial Java package may be a bit limited. With CodeWarrior dropping out of the Mac and Windows development arena, coupled with Apple's big push to their own free tools, there are essentially two compilers left standing in the commercial world for the Mac: JBuilder by Borland and IDEA by JetBrains. Each retails for $499.
Shortly following the release of Mac OS X in 2001, Borland returned to the Mac development community with JBuilder, after an absence of nearly 15 years. Borland won a large number of awards for their JBuilder product, particularly for its ease of development. Supporting all of the latest standards, JBuilder quickly became the dominant IDE for Java, both on Windows and Mac OS X. Borland began making appearances at Apple's Worldwide Developer's Conference and quickly made inroads into the Macintosh. However, the tide began to turn in 2003 and 2004 when the popular (and free) Eclipse began to erode JBuilder's marketshare. About a year ago, Borland finally gave into the competition by announcing that its future roadmap will include integrating JBuilder with Eclipse. As of this writing, JBuilder 2006's system requirements no longer includes the Macintosh.
Each of the packages discussed in this article are very good Java compilers, so from that perspective, you really can't go wrong. However, Eclipse has taken on the Java world by storm and is likely to come out the clear winner in marketshare. It is one of the best freeware IDE's ever made available, and is better than most commercial ones. The only product better is IDEA, which excels above and beyond and Java IDE before it. IDEA is the best of the best and is this author's recommendation for Java development.
Next Month: Development Environments for BASIC.