Sun recently announced the general availability of JDK 1.4. JDJ's editor-in-chief, Alan Williamson, had the opportunity to sit down and talk with Sherman Dickman, senior product manager for the Java platform. Before the meeting Alan invited the readers of JDJ to put together some questions for Sherman. The following is a transcript of that meeting.
<alan>: What are the main features of this new JDK release?
<sherman>: Some of the features that stand out are 64-bit support, new I/O, XML support, Kerberos single sign-on capabilities, a reengineered Java technology-enabled 2D graphics engine, Java Web Start software, logging, assertions, IPv6, and a lot more. There's a great overview of the new features in the Java 2 Platform, Standard Edition (J2SE) 1.4 on our Web site at http://java.sun.com/j2se/1.4/.
<alan>: How many classes make up this JDK?
<sherman>: There are just over 11,000 classes in J2SE version 1.4. Note that this includes the implementation and not just the APIs, and does not include Java Web Start software.
<alan>: What has been the most requested feature you've addressed in this release?
<sherman>: In terms of the number of requests, "assertions" and "mouse-wheel support" were ranked very high when the feature list was first drafted, in the fall of 1999.
<alan>: The browser world is still catching up with Swing and developers still can't develop Swing apps to run within a browser without invoking a major download. What is Sun doing to encourage the browsers to take the leap and bridge the gap?
<sherman>: Actually, Netscape and Opera provide excellent support for J2SE. In addition, the J2SE platform is bundled with most major operating systems including Linux, Mac OS X, and the Solaris Operating Environment. There's one browser/OS vendor in particular that has yet to ship the J2SE platform, so we're providing improvements to the Java plug-in software that enables users to run browser applets on the J2SE platform. The key developer advantage of these improvements is that existing applets can be run without the need to modify <APPLET> tags in HTML pages.
<alan>: Why was the release of 1.4 delayed? What was causing the major issue?
<sherman>: We originally planned to release the J2SE 1.4 platform at the end of 2001, however, there were a few things that contributed to our February 13 release date. A couple of Java Specification Requests needed to complete the full Java Community Process cycle. We also wanted to ensure that there was sufficient time to address some of the customer feedback we received from our betas, in addition to providing a bit more bake time into the release to satisfy our reliability goals.
<alan>: Why did it take so long to address the Swing performance and underlying graphics redraw problems?
<sherman>: J2SE version 1.2 was the first major release to introduce the new Java 2D package, which serves as the core rendering engine for J2SE. The focus for this first Java 2 release was feature completeness, and later releases were dedicated to tuning the new graphics system. We identified a lot of tuning opportunities, and in the interests of shipping the 1.3 release in a timely fashion, we decided to spread this work across the 1.3 and 1.4 releases. So the performance of Swing for each release has steadily improved, and we anticipate yet another boost in the 1.5 time frame.
<alan>: How's float and double arithmetic performance relative to JDK 1.3?
<sherman>: I'm not aware of special work to improve float/double performance in 1.4, although bounds-check elimination really helps for code that's floating-point intensive. It's probably a bit faster, but not something we track independently.
<alan>: How about a performance comparison for different sections of the JDK versus previous JDKs.
<sherman>: There's a great 1.4 performance guide at http://java.sun.com/j2se/1.4/performance.guide.html, and I'd like to encourage everyone to check it out. It goes into a lot of detail and serves as a great resource for anyone interested in evaluating the performance improvements from 1.3 to 1.4.
<alan>: What are some of improvements that were done to the compiler (such as branch prediction)?
<sherman>: There are two HotSpot virtual machine compilers in the J2SE platform – one tuned for clients and the other for servers. Improvements in the client compiler include better local code quality, improved inlining, providing significant speedups to most Java technology-enabled programs, and optimized performance for new I/O. Improvements in the server compiler include a new deterministic inlining mechanism, array bounds check optimization, new loop optimizations, and a substantial effort toward stability.
<alan>: Does Sun ever plan to remove any APIs that have been deprecated since JDK 1.0/1.1?
<sherman>: Sun currently does not have plans to remove deprecated APIs.
<alan>: In general, what are Sun's intentions regarding deprecated APIs?
<sherman>: Deprecation is advice to developers that some APIs have been replaced with better ones. It doesn't mean the old API is going away. Going forward we intend to make very limited use of additional deprecations.
<alan>: Why were assertions added as a change to the language instead of an API?
<sherman>: A library approach would have worked, but it would have been either ugly (requiring an "if" statement for each assertion) or inefficient (evaluating the asserted condition even if assertions were disabled). Faced with these deficiencies, we felt that developers were more likely to prefer the addition of assertions into the language itself.
<alan>: Why can't they make Swing more lightweight in terms of being able to utilize a single component without having to drag the entire API along?
<sherman>: Object-oriented systems like Java emphasize reuse through specialization. Component systems like JavaBeans focus on reuse through configurability and delegation. Both of these approaches have a tendency to produce systems with many highly interdependent general-purpose parts and Swing is no exception. One unfortunate side effect of this is that startup time and the working set grow as the number of classes loaded and used grows. We balance this growth by limiting dependencies that cross functional boundaries, sometimes even at the expense of reuse. This is an ongoing process and it's the primary focus of the Swing implementation work that's underway now.
<alan>: Are there any plans for a Java 2.0?
<sherman>: By Java 2.0, do you mean a Java 3 platform?
The development goals behind the J2SE platform are to provide consistent and compatible releases of J2SE technology over time. We recently shipped the J2SE 1.4 platform, and are beginning the planning process for version 1.5, which will release approximately 18 months from now.
The shift from the Java 1.x–based platform to the Java 2 Platform, Standard Edition in 1998 was quite substantial, but the platform is maturing quite nicely with our current release model. There are currently no plans for a Java 3 Platform, Standard Edition in the near future.
<alan>: Which, if any, of the JAX Pack APIs will be moved to the JDK? What is future thinking about the JDK and Web services APIs? JAX Pack forever or will some "sneak" into the JDK?
<sherman>: Great question! XML parsing and XSLT support were included in the J2SE 1.4 release. Since all J2SE releases now participate in the Java Community Process, it will really be up to the expert group for J2SE version 1.5 to determine which XML APIs should be included as part of the core J2SE platform. In the meantime, additional XML APIs will ship via the Java XML Pack.
<alan>: Is the XP plug-in part of JRE 1.4?
<sherman>: Yes, it is, and will be a part of all J2SE technology releases moving forward.
<alan>: When they started working on the regular expressions package for 1.4, did they look at other regular expressions packages? Apache has the ORO package, a very nice package, in my opinion.
<sherman>: Yes, we evaluated other regular expressions packages to get a feel for what functionality a good regex package should offer. The goal was go with a syntax similar to the most popular regex language out there, Perl. Our design profited from the efforts of the ORO project, as well as other earlier efforts.
<alan>: When will Sun be updating the community edition of Forte for JDK 1.4?
<sherman>: Today! The Forte for Java Community Edition IDE can be downloaded with J2SE 1.4 from our Web site at http://java.sun.com/j2se/1.4/download.html.
<alan>: With respect to 1.5, is there anything that should have been part of 1.4 that has now been pushed back to Tiger (1.5)?
<sherman>: Yes. In the interests of shipping J2SE 1.4 on time with great performance and reliability, we had to make some tough decisions and defer a few features to the 1.5 release. This included the JPDA back-end expression evaluation, a character converter generator tool, concise array literals, socket factory support, and a few features from new I/O, including scanning and formatting and an improved file system interface.
<alan>: Sherman, on behalf of our readers and myself, I would like to thank you for taking the time to answer our questions. We'll be back when you announce 1.5!