February, 2005 Java News

Monday, February 28, 2005

Sun has posted the first beta (after a couple of alphas) of the NetBeans Integrated Development Environment (IDE) 4.1. This early access release is available for Windows, Linux, and Solaris. New features in version 4.1 focus on Enterprise JavaBeans and Web Services. Beta 1 adds the ability to import projects from Eclipse. Final release is planned for April, 2005. Java 1.4.2 or later is required.


Steve Roy has released MRJ Adapter 1.0.9, an open source library that implements a unified API for developers to access Mac specific functionality built into the various versions of the Macintosh Runtime for Java (MRJ). MRJ Adapter enables developers to add Mac specific functionality to their applications without compromising the cross-platform nature of their application. MRJ Adapter also "incorporates many little tricks known only to seasoned Mac Java programmers, such as how to bring up a file dialog to pick a folder, or how to set up a menu bar when no frame is opened, which is a normal state for a Mac application that isn't natively supported by Java." The main change in 1.0.9 is that it is now published under the Artistic License rather than the LGPL. 1.0.9 also fixes bugs and adds explicit support for the the Quaqua Look and Feel.


Etienne Gagnon has released version 1.1.10 of SableVM, a Java bytecode interpreter (that is, a virtual machine) written in C. "SableVM requires an ANSI/ISO C compiler (but preferably GCC) and a POSIX platform. It requires a strong memory model (sequential consistency) on multiprocessor systems." SableVM is available for GNU/Linux, Solaris, and FreeBSD. Version 1.1.10 improves JNI support, upgrades GNU Classpath to 0.14, implements basic JDK_HOME support, and fixes various bugs. SableVM is published under the GNU Lesser General Public License (LGPL). The developers claim it's written in portable C, but in my experience it's unlikley to be able to be built on anything except the latest and greatest Linux and possibly BSD. It will not build on Mac OS X or older versions of Linux. :-(

Saturday, February 22, 2005

Sun has posted proposed final drafts of four Java 2 Micro Edition (J2ME) related Java Specification Requests (JSRs). These are

Version 1.1 updates the various device profiles to Java 1.4.

Friday, February 25, 2005

Michael Jakl has posted FProfiler 0.6.4, an open source instrumenting profiler for Java based on BCEL and log4j. It inserts the needed instructions directly into the bytecode of the classes. 0.6.4 is a bug fix release. FProfiler is published under the GPL.

Thursday, February 24, 2005

I've written a short article on the Cafes about comparing strings in a case insensitive fashion.


The Software Development 2005 Expo in Santa Clara next month (March 14-18) is looking for a few more volunteers to man doors, distribute notes, and similar tasks. For each day a you volunteer you get to attend the conference for a day free, and most volunteer days involve nothing more strenuous than sitting in the back of the room listening to the presentation, and collecting eval forms at the end; so really, it's a nice way to attend the show for free.


Sun has posted a revised public draft review of Java Specification Request 243: Java™ Data Objects 2.0 - An Extension to the JDO specification. The previous draft was voted down. It's not immediately apparent to me whether this draft satisfies the concerns of the naysayers on the last draft (mostly related to the relationship between JDO and EJB persistence).

Wednesday, February 23, 2005

Apple's posted Security Update 2005-002 to patch a vulnerability in Java 1.4.2 that could allow an untrusted applet to elevate privileges and execute arbitrary code. All users should upgrade.


The Legion of the Bouncy Castle has released version 1.27 of the Bouncy Castle Java Cryptography API, an open source, clean-room implementation of the Java Cryptography Extension (JCE). It supports X.509 certificates, PKCS12, S/MIME, CMS, PKCS7, and lots of other juicy acronyms. It also includes its own light-weight crypto API that works in Java 1.0 and later, and does not depend on the JCE. Version 1.27 supports the PSS and OAEP classes in JDK 1.5 and adds support for SHA-256, SHA-384, and SHA-512 to the CMS implementation. The OpenPGP API also disables the quick check for public key encrypted messages in line with the latest security advisory from PGP Corporation. Download it while it's still legal.


Andrei Kouznetsov has released Unified I/O 2.22, an open source (BSD license) class library that "allows random access to any data or stream (even over HTTP), and gives a clear difference between read only and read/write access." This release adds BitInputStream and BitOutputStream classes for bitwise reading and writing and a Base64 encoder and decoder based on these classes.


Cenqua has released Clover 1.3.5, a $250 payware unit test coverage tool. 1.3.5 is a bug fix release.

Clover modifies the source code to enable it to follow which statements are executed when, and keeps a running count of how many times each statement is executed during the test suite. Any statement that executes zero times is not being tested. Unlike Jester, Clover only tests whether the tests execute each statement and follow each branch. (It occasionally misses branches on the edges of >= or <=.) It does not test whether the tests correctly detect bugs. On the other hand, it runs orders of magnitude faster than a tool like Jester does. It's easy to use Clover several times a day. Indeed you can use it after each change to the test suite. By contrast, a full Jester run can take several days to complete. Ideally you'd want to use both a tool like Jester and a tool like Clover since they do different things.

Clover has been a major help in developing XOM. It has located numerous bugs in XOM over the last year, and is largely responsible for the completeness of XOM's test suite. Clover has also helped to optimize XOM for both speed and size by finding dead, unreachable code I could cut out. As usual, I tested the new release on the current XOM code base, and it didn't reveal anything too astonishing—just a few untest lines in some of the newer parts of the code base—but I've been keeping a fairly close eye on the test coverage as I develop so this isn't too surprising.

Clover integrates with Ant, NetBeans, Eclipse, IntelliJ IDEA, and Oracle JDeveloper 10g. Clover can generate test coverage reports in XML, HTML, PDF, or via a Swing Viewer. Java 1.2 or later is required.


The Big Faceless Organization has released the Big Faceless PDF Library 2.3.5, a $700 payware (more if you want support) Java class library for creating PDF documents. The $1300 Extended Edition adds the AcroForms support, digital signatures, and the ability to import and edit and existing PDF documents. Version 2.3.5 fixes bugs. Java 1.2 or later is required.


Websina has released BugZero 3.9.10, a $1299 payware (+$300 for maintenance) Web-based bug tracking system that supports multiple projects, group-based access, automatic bug assignment, file attachment, email notification, and metric reports. Bug Zero is written in Java and can run on top of various backend databases including MySQL. 3.9.10 fixes bugs and allows disabling of automatic assignment.

Tuesday, February 22, 2005

I'm pleased to announce the first alpha release of XOM 1.1, my free-as-in-speech (LGPL) dual streaming/tree-based API for processing XML with Java. Version 1.1 maintains backwards compatibility with XOM 1.0 while adding a number of important new features including:

The XPath support is especially useful. You can now write declarative queries like these that find all the person elements instead of writing complicated, fragile navigation code:

Nodes people = doc.query("//person");
XPathContext = new XPathContext("html", "http://www.w3.org/1999/xhtml");
Nodes toc = doc.query("//html:div[@id='toc']/child::node()", context)

The XPath support is based on the latest Jaxen source code. This is the same engine used in JDOM and dom4j. However, before bundling this with XOM I fixed a lot of bugs in Jaxen, and worked around several others. XOM is much more conformant to the XPath specification than either JDOM or dom4j. There's still at least one nasty bug in XPath evaluation I haven't been able to fix yet, but so far I've only seen it with an unusual, redundant union expression that's unlikely to arise in practice (//. | /). More importantly, there are probably other undiscovered bugs waiting to bite. If you spot any of the critters, holler and I'll try to stomp them.

Monday, February 21, 2005

Mark Doliner has forked JCoverage to create Cobertura, a free-as-in-speech (GPL) code coverage tool for Java. I'm not sure this is so much of a fork as it is picking up an abandoned project and running with it. The sample output looks solid, not quite as polished as Clover's output, but functional and readable. It is a little embarrassing just how little of Cobertura's own code is covered by unit tests.


The Eclipse Project has posted Eclipse 3.1M5a to fix a bug that slipped out in 3.1M5. If you've already downloaded 3.1M5, download 3.1M5a.


Nathan Fiedler has released version 2.33 of JSwat, a graphical, stand-alone Java debugger built on top of the Java Platform Debugger Architecture. Features include breakpoints, source code viewing, single-stepping, watching variables, viewing stack frames, and printing variables. Version 2.33 fixes bugs. JSwat is published under the GPL.


The Jakarta Apache Project has posted version 5.5.8 of the Tomcat 5.5.8 open source servlet container and the official reference implementation of the Java Servlet API 2.4 and Java Server Pages (JSP) 2.0. The version numbering is funky but this is basicly an alpha release after the 5.5.7 production release. (Why, oh why, can't they just call this 5.6 alpha 1 like any sane devloper would?) 5.5.8 mostly fixes bugs. "Tomcat 5.5 is designed to run on J2SE 5.0 and later, and requires configuration to run on J2SE 1.4....In addition, Tomcat 5.5 uses the Eclipse JDT Java compiler for compiling JSP pages. This means you no longer need to have the complete Java Development Kit (JDK) to run Tomcat, but a Java Runtime Environment (JRE) is sufficient. The Eclipse JDT Java compiler is bundled with the binary Tomcat distributions. Tomcat can also be configured to use the compiler from the JDK to compile JSPs, or any other Java compiler supported by Apache Ant."

Sunday, February 20, 2005

Sleepycat Software has released Berkeley DB Java edition 1.7.1. Berkeley DB JE is an open source, non-relational embedded database written in Java. The data is exposed through "a Java Collections-style interface, as well as a programmatic interface similar to the Berkeley DB API." This release fixes bugs and improves performance. Java 1.4.2 or later is required.

Saturday, February 19, 2005

The Eclipse Project has posted the fifth milestone of Eclipse 3.1, an open source integrated development environment (IDE) for Java. Eclipse also doubles as a base platform for your own applications, an alternative to the AWT and Swing, and a powerful floor wax and dessert topping. The main new features in 3.1 are Ant 1.6.2, quick fixes for serial version IDs, and some (still incomplete) support for Java 1.5. New SWT features in this milestone include:

Significant Java IDE enhancements include:

Friday, February 18, 2005
Mike Cannon-Brookes

Atlassian has released JIRA 3.1, a $1200-$4800 payware J2EE-based bug tracking and project management server application. Version 3.1 adds customizable CSV import and improves the SOAP and XML-RPC remote interface. I've been using Jira lately with Jaxen and Apache. It's a definite improvement over Bugzilla. I'm not sure it reallly does anything that Bugzilla doesn't do (at least not anything I use) but the user interface is about a hundred times cleaner.

Thursday, February 17, 2005

Sun's submitted JSR-270 J2SE 6.0 ("Mustang") Release Contents to the JCP. The proposed specification will define the feature set for the next major release of the Java 2 Standard Edition platform, code named "Mustang", which is targeted to ship in 2006. Mustang is one of a ongoing series of J2SE feature releases. The goal is to ship feature releases on a regular 18-24 month cycle, with each release including a combination of quality improvements and new features. This JSR will not itself define any new features or enhancements; it will, rather, enumerate features and enhancements defined in other JSRs or through the JCP maintenance process. It is expected that most of the effort in the Mustang release will be toward product quality (bug fixing) and stability, with relatively less work going into new APIs and other kinds of features."

Wednesday, February 16, 2005

The NetBeans Project has posted the first beta (after a couple of alphas) of profiler based on Sun Labs' JFluid. It can profile memory and CPU usage. New features in this beta include remote profiling, integration wizards for many web/application servers, and numerous bug fixes. NetBeans 4.0 or 4.1 is required.


IBM's alphaWorks has released version 1.2.4 of the IBM Toolkit for MPEG-4, a Java class library for working with MPEG-4 video and audio. Version 1.2.4 provides various minor improvements including new Swing and SWT player SDK samples.

Tuesday, February 15, 2005

Version 5.0 of SuperWaba, an open source Java virtual machine for handheld operating systems including PalmOS and Windows CE devices, has been released. 5.0 adds support for the Symbian smart phone platform, and speeds up graphics. SuperWaba is published under the LGPL.


YourKit, LLC has released YourKit Java Profiler 4.0, a 295€ payware tool for detecting memory leaks and memory consumption bottlenecks. It features memory leak detection, an object heap browser, JUnit integration, IntelliJ IDEA, Borland JBuilder, and Eclipse 3.1 integration. Version 4.0 adds support for Mac OS X and simplifies analysis of custom class loaders and the classes they load.

Monday, February 14, 2005

Cedric Beust has released TestNG 2.1, an open source ( testing (unit, functional, and integration) framework based on annotations. New features in this release include nvocationCount, successPercentage, timeOut, and dependsOnMethods. TestNG is released under the Apache Software License. Java 1.4 or later is required.

TestNG is intended to replace JUnit, but mostly the problems that led Beust to create it aren't ones I've encountered, with the single exception of run-once initialization code. In fact, some of the problems he cites strike me as features, not bugs. For instance, I consider it essential that one test method not depend on another. Genuine tests (as opposed to shared initialization code) should be able to be run independently and in any order. However, perhaps this is a distinction between functional and unit tests. I seriously question the decision to move some of the configuration out of the code and into separate XML files. As much as I love XML, the difficulty of keeping multiple files in sync to make tests run is just too much of a pain. One of the innovations of JUnit and the important insights of Beck and Gamma was that programmers like writing code, and therefore tests that are pure code are more likely to be written and maintained in the first place.

Beust is right that JUnit's assert methods put the error message string in the wrong place. It should be the last argument, not the first. (In general, optional arguments should come later.) However, his suggested fix goes too far by providing both failure messages and success messages. Successful tests should generate no visible output. Otherwise, it's too easy to miss the one failing test in a sea of success messages. Even if you do realize a test has failed, sifting through the success messages looking for the failed test is a pointless exercise. A test suite should just tell you about the tests that have failed and need to be fixed. I don't need to see details from tests that have passed.

I think this problem has been corrected in the actual release, but the poorly organized documentation makes it hard to be sure. One of JUnit's strengths was its documentation and evangelization. There's no decent equivalent to "Test Infected" explaining how to start using TestNG. Instead, the documentation reads like random jottings in a developer's notebook. Some parts are documented very well, and some not at all. Which parts are which seems to have more to do with what the developer was interested in writing about than what a potential user is interested in learning about. There's no one place a new user can jump in and start learning about TestNG. So, while there might be some good software here, it's too hard to find.


Cenqua has posted FishEye 0.10, a $999 payware tool for viewing CVS activity. I've been using FishEye lately as part of my work with the Jaxen Project. As well as drawing graphs of activity, it lets you see who's committing what when to CVS, what individual committers have been up to, what's going on in different branches, what's happened to particular files, and so forth. It's not essential, and I doubt I'd pay for it if Cenqua hadn't given Codehaus a free copy. XOM doesn't use it, and I haven't missed it there. However, FishEye is a nice tool that's a definite improvement over standard CVS and ViewCVS.


Derrick Oswald has released the HTML parser 1.5, a free (LGPL) class library for parsing "real-world HTML." This release adds support for proxies, passwords and cookies. It also provides a new API for filters.


Sebastiano Vigna has released version 4.4 of fastUtil, a collection of type-specific Java maps and sets with a small memory footprint and faster access and insertion. The classes implement their standard counterpart interfaces such as java.util.Map and can be plugged into existing code. However, they also contain type-specific methods. For instance, the CharList class has not only the usual add(Object o) method but also an add(char c) method. Version 4.4 adds a new package for high-performance I/O of objects, arrays, and iterators. fastUtil is published under the GNU Lesser General Public License (LGPL).

Saturday, February 12, 2005

IBM's alphaWorks has released HeapAnalyzer 1.3.3, a tool for locating possible memory leaks through "heuristic search engine and analysis of the Java heap dump in Java applications. Java heap areas define objects, arrays, and classes. When the Garbage Collector allocates areas of storage in the heap, an object continues to be live while a reference to it exists somewhere in the active state of the JVM; therefore the object is reachable. When an object ceases to be referenced from the active state, it becomes garbage and can be reclaimed for reuse. When this reclamation occurs, the Garbage Collector must process a possible finalizer and also ensure that any internal JVM resources that are associated with the object are returned to the pool of such resources. Java heap dumps are snap shots of Java heaps at specific times." Version 1.3.3 adds support for the .phd format.

Friday, February 11, 2005

While reading Brett McLaughlin's article about annotations, I decided that I actually like annontations, and they make quite a bit of sense. I hadn't paid much attention to annotations before because most people seemed to be using them to do weird things with EJB, web services, and other complex technologies that I've always found far too baroque to be of interest. However, annotations apparently have quite a bit of use for plain, everyday Java code too. What I don't understand, though, is why this was designed in such a way as to break source level compatibility with Java 1.4. If the syntax had been hidden inside comments, I could put annotations in my code and still compile it on my Mac. As it is, XOM and other code bases that must run in Java 1.4 and earlier basically can't use this stuff. That's a shame.

Thursday, February 10, 2005

Andrei Kouznetsov has released UnifiedIO 2.2, an open source (BSD license) class library that "allows random access to any data or stream (even over HTTP), and gives a clear difference between read only and read/write access." This release allows buffers to be dropped to improve memory usage.

Wednesday, February 9, 2005

Sun has posted the public review draft and reference implementation of Java Specification Request 223, Scripting for the Java™ Platform. This defines a javax.script package that enables various scripting languages like PHP to interface with Java. Comments are due by March 10.


Sun has posted the second draft of Java Specification Request 220, Enterprise JavaBeans 3.0. This is now divided into two specs, one for the simplified API and one for the persistence API. According to the overview of the simplified spec, "The EJB 3.0 release of the Enterprise JavaBeans architecture provides a new, simplified API for the enterprise application developer. This API is targeted at ease of development and is a simplification of the APIs defined by earlier versions of the EJB specification. The existing EJB 2.1 APIs remain available for use in applications that require them and components written to those APIs may be used in conjunction with components written to the new EJB 3.0 APIs." Quoting from section 1.2:

EJB 3.0 is focused on the following goals:

  • Definition of the Java language metadata annotations that can be used to annotate EJB applications.
  • These metadata annotations are targeted at simplifying the developer’s task, at reducing the number of program artifacts the developer is required to provide, and at eliminating the need for the developer to provide an EJB deployment descriptor.
  • Specification of programmatic defaults, including for metadata, to reduce the need for the developer to specify common, expected behaviors and requirements on the EJB container. A “configuration by exception” approach is taken whenever possible.
  • Encapsulation of environmental dependencies and JNDI access through the use of annotations, dependency injection mechanisms, and simple lookup mechanisms.
  • Simplification of the enterprise bean types. Enterprise beans are simplified to more closely resemble plain Java objects (“POJOs”) or JavaBeans.
  • Elimination of the requirement for EJB component interfaces for session beans and entity beans. The required business interface for a session bean can be a plain Java interface, not an EJBObject, EJBLocalObject, or java.rmi.Remote interface. No interfaces are required for entity beans written to the new persistence API [2].
  • Elimination of the requirement for home interfaces.
  • Simplification of entity bean persistence. Support for light-weight domain modeling, including inheritance and polymorphism.
  • Specification of Java language metadata annotations for object/relational mapping for entity beans.
  • Enhancements to EJB QL to provide greater usability. Addition of projection, explicit inner and outer join operations, bulk update and delete, subqueries, and group-by. Addition of a dynamic query capability and support for native SQL queries.
  • Reduction of the requirements for usage of checked exceptions.
  • Elimination of the requirement for the implementation of callback interfaces.
  • Improved ability for testing outside the container.

Comments are due by March 10.

Tuesday, February 8, 2005

Jonas Bonér and Alexandre Vasseur have posted the third release candidate of AspectWerkz 2.0, an open source aspect oriented programming framework for Java, has been released. According to the web page, "AspectWerkz utilizes bytecode modification to weave your classes at project build-time, class load time or runtime. It hooks in using standardized JVM level APIs. It has a rich and highly orthogonal join point model. Aspects, advices and introductions are written in plain Java and your target classes can be regular POJOs. You have the possibility to add, remove and re-structure advice as well as swapping the implementation of your introductions at runtime. Your aspects can be defined using either Java 5 annotations, Java 1.3/1.4 custom doclets or a simple XML definition file." AspectWerkz is published under an "LGPL-style license".


The Big Faceless Organization has released the Big Faceless PDF Library 2.3.3, a $700 payware (more if you want support) Java class library for creating PDF documents. The $1300 Extended Edition adds the AcroForms support, digital signatures, and the ability to import and edit and existing PDF documents. Version 2.3.3 fixes bugs. Java 1.2 or later is required.

Sunday, February 6, 2005

Why does open source usability continue to suck so badly? I mean, the Gnome Project (to name just one) can't even get the easy stuff right. For instance, take a look at this screenshot from the absolute latest release of Gnome, and look at the the menu bar, toolbar, and buttons. It may not be immediately obvious to you what's wrong, but it will probably bother you somewhat, maybe consciously, maybe not. Fixing this would be so easy. It wouldn't violate any patents. It would take about five minutes of time, maximum. And yet it's been an outstanding issue in Gnome for years. I'm familiar with all the explanations for why open source usability sucks: no money to support user testing, programmers prefer to add features than to take them out, CS departments don't teach usability. Frankly, I'm not sure any of these suffice to explain such long-standing and easy-to-fix problems as the one that leaps out from that screenshot.

I'm really beginning to wonder if maybe programmers (who as a group control open source development) are genetically incapable of seeing problems like this. It's long been known that programmers tend to score quite differently on various personality tests such as the Meyers-Briggs than the general population does. Could it be that programmers really can't see the problems with these interfaces? I know not everyone (myself included) is capable of designing attractive, usable interfaces; but most of us can at least recognize them when we see them and tell the difference between good and bad. I'm not sure most programmers can. For instance, why that hideous Jupiter colored background? I hope that's just one user's choice. Gnome's had much nicer background colors in the past, and I prefer to think they're at least not going backwards. Oh, by the way, in case you couldn't quite put your finger on what was wrong, the font wasn't bold enough for a user interface item. Small detail, I know; but that's the point. This is so easy to fix, why haven't they fixed it?


The Jakarta Apache Project has posted the first release candidate of HTTPClient 3.0. New features in 3.0 include:

According to the announcement, "The 3.0 API is frozen and all known bugs have been fixed. Assuming no major problems are discovered in RC1 a final 3.0 release will follow shortly. We strongly encourage all current HttpClient users to start migrating."

Saturday, February 5, 2005

Enterprise Distributed Technologies has released edtFTPj 1.4.6, a free (LGPL) FTP library for Java. "This release adds ACCT and ABOR command support and writable file checking before downloading, and makes some useful methods/classes public rather than package-protected." A $249 payware version adds support for FTP over SSL.


Nathan Fiedler has released version 2.31 of JSwat, a graphical, stand-alone Java debugger built on top of the Java Platform Debugger Architecture. Features include breakpoints, source code viewing, single-stepping, watching variables, viewing stack frames, and printing variables. Version 2.31 fixes bugs. JSwat is published under the GPL.


The Jakarta Apache Project has posted the second beta of Commons Transaction 1.1. "Commons Transaction aims at providing lightweight, standardized, well tested and efficient implementations of utility classes commonly used in transactional Java programming. Initially there are implementations for multi level locks, transactional collections and transactional file access. There may be additional implementations when the common need for them becomes obvious. However, the complete component shall remain compatible to JDK1.2 and should have minimal dependencies." Version 1.1 tries to polish interface oddities and makes locking and the file store more flexible. Locking now is much more flexible, extensible and allows for rudimentary transaction management.

Friday, February 4, 2005

If you're not watching the new Battlestar Galactica because the original series was so cheesy, you don't know what you're missing. It's like refusing to watch Buffy the Vampire Slayer because the movie was so silly. The new Battlestar Galactica is shockingly good. It's as close to the top of the TV sci fi heap as the original series was to the bottom. We'll have to wait and see how the series progresses, but if it keeps up the current high standards, it may well be the best TV science fiction series ever. Do yourself a favor and check it out tonight at 10:00 P.M. EST on the SciFi Channel. (Yes, it's a slow news day.)

Thursday, February 3, 2005

IBM's alphaWorks has released a new version of the Documentation Enhancer for Java, a "tool that enhances Javadoc documentation files with semantic information gathered by analyzing the corresponding class files." Features include:

This release "enables extension of the framework to include user-specific information into Javadoc files by defining new Analyzers and Transformers." It also adds support for Java 1.4 and fixes some bugs.

Wednesday, February 2, 2005

Sun has submitted JSR-269, Pluggable Annotation Processing API to the Java Community Process (JCP). According to the JSR, "

J2SE 1.5 added a new Java language mechanism "annotations" that allows annotation types to be used to annotate classes, fields, and methods. These annotations are typically processed either by build-time tools or by run-time libraries to achieve new semantic effects. In order to support annotation processing at build-time, this JSR will define APIs to allow annotation processors to be created using a standard pluggable API. This will simplify the task of creating annotation processors and will also allow automation of the discovery of appropriate annotation processors for a given source file.

The specification will include at least two sections, a section of API modeling the Java programming language and a distinct section for declaring annotation processors and controlling how they are run. Since annotations are placed on program elements, an annotation processing framework needs to reflect program structure. Annotation processors will be able to specify what annotations they process and multiple processors will be able to run cooperatively.

The processors and program structure API can be accessed at build-time; i.e. this functionality supplements core reflection support for reading annotations.

Comments are due by February 14.


Siemens and Nokia have posted the public review draft specification of JSR-228, Information Module Profile - Next Generation (IMP-NG) to the JCP. IMP-NG is a strict subset of the Mobile Information Device Profile (MIDP), version 2.0 for smaller, user-interfaceless devices such as network cards, routers, tracking devices, and vending machines. It is designed to operate on top of the Connected, Limited Device Configuration (CLDC) 1.0 or later. According to the draft, IMP-NG implementations

  • MUST support IMP and IMP-NG IMlets and IMlet Suites.
  • MUST include all non-optional packages, classes, and interfaces described in this specification.
  • MUST implement the OTA User Initiated Provisioning specification.
  • MAY incorporate zero or more supported protocols for push.
  • MAY provide support for accessing any available serial ports on their devices through the CommConnection interface.
  • MUST provide support for accessing HTTP 1.1 servers and services either directly, or by using gateway services.
  • MUST provide support for secure HTTP connections either directly, or by using gateway services.
  • SHOULD provide support for datagram connections.
  • SHOULD provide support for server socket stream connections.
  • SHOULD provide support for socket stream connections.
  • SHOULD provide support for secure socket stream connections.
  • MAY support Tone Generation in the media package.
  • MUST support 8-bit, 8 KHz, mono linear PCM wav format IF any sampled sound support is provided.
  • MAY include support for additional sampled sound formats.
  • MUST support Scalable Polyphony MIDI (SP-MIDI) and SP-MIDI Device 5-to-24 Note Profile IF any synthetic sound support is provided.
  • MAY include support for additional MIDI formats.
  • MUST implement the mechanisms needed to support “Untrusted IMlet Suites”.
  • MUST implement “Trusted IMlet Suite Security” unless the device security policy does not permit or support trusted applications.
  • MUST implement “Trusted IMlet Suites Using X.509 PKI” to recognize signed IMlet suites as trusted unless PKI is not used by the device for signing applications.
  • MUST implement “MIDP x.509 Certificate Profile” for certificate handling of HTTPS and SecureConnections.
  • MUST enforce the same security requirements for I/O access from the Media API as from the Generic Connection framework, as specified in the package documentation for javax.microedition.io.
  • MUST support at least the UTF-8 (http://ietf.org/rfc/rfc2279.txt) character encoding for APIs that allow the application to define character encodings.
  • MAY support other character encodings.
  • SHOULD NOT allow copies to be made of any IMlet suite unless the device implements a copy protection mechanism.

Comments are due by March 7.


Tom Copeland has released PMD 2.3, an open source tool for automatically checking Java code for various classes of bugs. This is a bug fix release that prevents assorted NullPointerExceptions introduced in the 2.2 release a couple of days ago.


JScape has released the Secure FTP Factory 4.2, a $599 payware class library for FTP, SFTP, and FTPS (FTP over SSL) protocols. Java 1.2.2 or later is required.


YourKit, LLC has posted the seventh public beta of YourKit Java Profiler 4.0, a 295€ payware tool for detecting memory leaks and memory consumption bottlenecks. It features Automation of memory leak detection, an object heap browser, JUnit integration, IntelliJ IDEA, Borland JBuilder integration. Version 4.0 adds support for Mac OS X and simplifies analysis of custom class loaders and the classes they load. This release fixes bugs and adds some information to the user interface.

Tuesday, February 1, 2005

Tom Copeland has released PMD 2.2, an open source tool for automatically checking Java code for various classes of bugs. PMD scans Java source code and looks for potential problems including:

New rules in this release include LocalVariableCouldBeFinal, MethodArgumentCouldBeFinal, AvoidInstantiatingObjectsInLoops, ArrayIsStoredDirectly, MethodReturnsInternalArray, AssignmentToNonFinalStatic, and AvoidConcatenatingNonLiteralsInStringBuffer. This release also adds vbhtml output, whatever that is.

I remain amazed at how useful these tools are. I keep using them, and they keep finding more bugs. I just ran one ruleset (unused code) on XOM, and it found a whole pack of unused private fields, unused local variables, and unused private methods that have either been introduced or stopped being used since I last ran PMD a month or two ago. (It also reported a dozen or so false positives: methods that it claimed weren't used but actually were used, so there may be a few bugs introduced since 2.1.)

One thing PMD found a lot of was places where private fields, method arguments, and local variables could be declared final. The latter two are listed as optimization rules. I can believe that marking these as final wouldn't hurt, but would it really help? Shouldn't compilers be smart enough to figure out that the variable is effectively final, even if not marked so? I've always treated final on method arguments and local variables, as just a hint to the programmer. (Occasionally they are necessary to make anonymous inner classes work; very occasionally in my code, since I almost never use anonymous inner classes.) Could it actually speed up a program to explicitly mark these as final? Does the finality of local variables and method arguments actually appear in the byte code somehow where the JIT can take advantage of it, or is it compiled away? Suggestions appreciated.


Older news:

20052004200320022001200019991998
January, 2005 January, 2004 January, 2003 January, 2002 January, 2001 January, 2000 January, 1999 January, 1998
February, 2005 February, 2004 February, 2003 February, 2002 February, 2001 February, 2000 February, 1999 February, 1998
March, 2005 March, 2004 March, 2003 March, 2002 March, 2001 March, 2000 March, 1999 March, 1998
April, 2005 April, 2004 April, 2003 April, 2002 April, 2001 April, 2000 April, 1999 April, 1998
May, 2005 May, 2004 May, 2003 May, 2002 May, 2001 May, 2000 May, 1999 May, 1998
June, 2005 June, 2004 June, 2003 June, 2002 June, 2001 June, 2000 June, 1999 June, 1998
July, 2005 July, 2004 July, 2003 July, 2002 July, 2001 July, 2000 July, 1999 July, 1998
August, 2005 August, 2004 August, 2003 August, 2002 August, 2001 August, 2000 August, 1999 August, 1998
September, 2005 September, 2004 September, 2003 September, 2002 September, 2001 September, 2000 September, 1999 September, 1998
October, 2005 October, 2004 October, 2003 October, 2002 October, 2001 October, 2000 October, 1999 October, 1998
November, 2005 November, 2004 November, 2003 November, 2002 November, 2001 November, 2000 November, 1999 November, 1998
December, 2005 December, 2004 December, 2003 December, 2002 December, 2001 December, 2000 December, 1999 December, 1998

[ Cafe au Lait | Books | Trade Shows | FAQ | Tutorial | User Groups ]

Copyright 2005 Elliotte Rusty Harold
elharo@metalab.unc.edu