April, 2005 Java News

Saturday, April 30, 2005

Several members of the Ant team privately commented on yesterday's news item about Ant 1.6.3. They made the usual batch of suggestions, and pointed me to the same FAQ entries I'd already read. None of them attempted to explain why the same junit task worked fine with Ant 1.5.4 and not at all in Ant 1.6.3. Possibly, all the different permutations I've tried of adding junit.jar to ANT_HOME/lib, the static classpath, and/or an Ant classpath element have managed to miss the one magic combination that would make Ant work; but if it really is that complex, then that very complexity is a bug. I thought some people might like an opportunity to comment on this publicly so I've posted an expanded version of my comments on the Cafes. Even if you're not struggling with Ant yourself, I think the notes on how not to write an error message are relevant to programmers on any platform in any language.

Friday, April 29, 2005

Apple is releasing Mac OS X 10.4 Tiger today, officially at 6:00 P.M. but some pre-orders started arriving a week ago. To the annoyance of Java developers everywhere it still only supports Java 1.4.2_07. There's no Tiger on Tiger. :-( I was thinking about grabbing a copy anyway, but first I'm going to have to figure out how to eject this damned James Brooks movie that's stuck in my DVD drive. It appears to be physically wedged in there somehow. All the usual tricks like booting into open firmware and holding down the mouse button while rebooting are doing bupkus. There doesn't seem to be a manual eject pinhole anywhere I can find. Next step: taking the drive out of the computer and banging on it with a hammer. Oh well. I was looking for an excuse to upgrade my drive to a dual-layer burner anyway.

However, there does seem to be a bit of good news. Although Tiger is not bundled with Tiger, Apple has just posted Java 5.0 for the Mac on their web site. It appears that only Mac OS X 10.4 (Tiger) is supported. I don't think this will run on Panther. OK. Now I've got to get serious about getting that DVD out of the drive.

Speaking of Tigers, Sun has posted the third update release for Java 5.0 Tiger with 79 assorted bug fixes. As usual it's available for Solaris, Windows, and Linux. As Sun speeds up its release cycle and Apple slows its down, I suspect Mac users will get this release just around the time we start to dine on talking cows that want to be eaten.

The Apache Project has released version 1.6.3 of Ant, the popular open source build tool. Version 1.6.3 is a bug fix release. However it still hasn't fixed the bug that makes the test target in XOM die, even though it runs just fine in 1.5.4. The error message claims:

Could not create task or type of type: junit.

Ant could not find the task or a class this task relies upon.

This is then followed by a lot of obnoxious verbiage about what could possibly be going wrong (half of which hasn't been true for at least two major releases) and a warning not to bother the Ant developers with this because they're sick of hearing from lusers like me. (Well, the message isn't quite that obnoxious, but it's close.)

Word to the Ant team: WAKE UP! You keep getting bug reports about the junit task because it's buggy. At absolute best, it's confusing and poorly designed. That's a bug. You need to fix it. But even allowing for the poor design and the user errors that causes, there are still some cases here where the junit task simply does not do what it claims to do despite the user doing exactly what they're supposed to do. I suspect ClassLoader issues, possibly involving multiple copies of JUnit, one in the user's CLASSPATH and one in Ant's lib directory. Ant does some really skanky things with multiple class loaders, and I know that's hard to debug and harder to test, but it needs to be done anyway. As a Google search on this error message will prove, many users are tripping all over the bugs in the junit task; and have been for a long time now. The first step to recovery is admitting you have a problem.

Thursday, April 28, 2005
Spiral of Death

NASA (yes, that NASA) has released Java PathFinder, an open source static code analysis tool for compiled Java bytecode. "In its basic form, it is a Java Virtual Machine (JVM) that is used as an explicit state software model checker, systematically exploring all potential execution paths of a program to find violations of properties like deadlocks or unhandled exceptions. Other than traditional debuggers, JPF reports the whole execution path that leads to a defect. JPF is especially suitable to find hard-to-test concurrency defects in multithreaded programs." Unlike a lot of static analysis tools such as PMD, PathFinder is designed to check programs, not classes. It starts from the main() method, and works its way through the program from there.

PathFinder is only available in source form. You'll have to compile it yourself. There's a build.xml file, but it doesn't actually work. Some directories and thrid party libraries are missing. These need to be installed manually. One of those libraries (FastMD5) isn't even available as a JAR archive. You have to manullay build your own JAR. Furthermore it uses C code, all to do some that can be done with pure Java code and no extra libraries using the standard class library. After I finally got all the necessary libraries installed and the classpath set up so I could test PathFinder on some of my code, it promptly threw a NullPointerException:

$ java -classpath 
gov.nasa.jpf.JPF  nu.xom.samples.FibonacciXML
Java Pathfinder Model Checker v3.1.2 - (C) 1999-2004 RIACS/NASA Ames Research Center

        at gov.nasa.jpf.jvm.MJIEnv.getElementInfo(MJIEnv.java:593)
        at gov.nasa.jpf.jvm.MJIEnv.getClassInfo(MJIEnv.java:580)
        at gov.nasa.jpf.jvm.ThreadInfo.printStackTrace(ThreadInfo.java:1309)
        at gov.nasa.jpf.jvm.ExceptionInfo.printOn(ExceptionInfo.java:51)
        at gov.nasa.jpf.jvm.NoUncaughtExceptionsProperty.printOn(NoUncaughtExceptionsProperty.java:54)
        at gov.nasa.jpf.search.PropertyMulticaster.printOn(PropertyMulticaster.java:112)
        at gov.nasa.jpf.Error.printOn(Error.java:58)
        at gov.nasa.jpf.util.Debug.println(Debug.java:199)
        at gov.nasa.jpf.util.Debug.println(Debug.java:205)
        at gov.nasa.jpf.search.AbstractSearch.error(AbstractSearch.java:254)
        at gov.nasa.jpf.search.AbstractSearch.isPropertyViolated(AbstractSearch.java:137)
        at gov.nasa.jpf.search.AbstractSearch.hasPropertyTermination(AbstractSearch.java:126)
        at gov.nasa.jpf.search.DFSearch.search(DFSearch.java:90)
        at gov.nasa.jpf.JPF.run(JPF.java:249)
        at gov.nasa.jpf.JPF.main(JPF.java:198)

This product is a lot rougher than I would have expected from NASA, especially given the fanfare with which it was announced. PathFinder is published under the NASA Open Source Agreement.

Jayasoft has released Ivy 1.0, a free Java based dependency manager, that features transitive dependencies, Ant integration, Maven compatibility, and continuous integration.

Wednesday, April 27, 2005

The Apache Maven Project has released a set of Ant tasks that expose Maven's artifact handling features from within Ant. Tasks include:

The Maven Project has also posted the first preview of Continuum, a "continous intergration server for building Java based projects." Continuum supports projects based on Ant, Maven 1, and Maven 2. It exposes web and XML_RPC interfaces, and provides e-mail notification of build failures. Code can be checked out of CVS and Subversion repositories.

Version 1.1.5 of the Kaffe open source Java virtual machine for various Unixes has been released. According to developer Jim Pick, "It has been tested, but not as thoroughly as a production release would be. It contains major improvements over 1.1.4, which was released one year ago. I anticipate that most people will have less trouble with this release, and more fun."

Tuesday, April 26, 2005

Sun has posted the first release candidate of the NetBeans Integrated Development Environment (IDE) 4.1. This early access release is available for Windows, Linux, Mac OS X, and Solaris. New features in version 4.1 focus on Enterprise JavaBeans and Web Services. Final release is has been pushed back to mid-May. Java 1.4.2 or later is required.

Monday, April 25, 2005

The second alpha of Mantis 1.0, a free-as-in-speech (GPL) bug tracking system based on PHP and MySQL, has been posted.

Websina has released BugZero 4.0.1, 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. 4.0.1 fixes bugs and adds a copy-to-create button that populates the new issue form with the values of the existing issue.

Sunday, April 24, 2005

Geert Bevin has posted the first release candidate of JHighlight 1.0, a free-as-in-speech (LGPL) syntax highlighting library that reads Java, HTML, XHTML, XML, and LZX languages and outputs syntax colored XHTML.

Julien Ponge has released IzPack 3.7.2, an open source tool for building cross-platform installers in Java. 3.7.2 is a bug fix release. IzPack is published under the GPL.

Saturday, April 23, 2005

Nokia has released the final version of Java Specification Request (JSR) 238, Mobile Internationalization API . "This specification defines an optional J2ME API that enables the internationalization and localization of MIDP applications. The API provides locale-specific formatting of common data items such as times, dates and currency amounts, and access to application resources that contain user interface text strings and other localizable items in a compact file format. Text strings can be sorted using locale-specific rules in conjunction with the Unicode(tm) Collation Algorithm."

Friday, April 22, 2005

I don't normally solicit donations for this web site. When people offer them, I normally request that they send something to Doctors Without Borders instead. I've also gotten a few GMail invites, but I prefer to store my mail locally, thanks. However, there's a recent offer that's too tempting to pass up. If anyone is planning to buy SubEthaEdit in the next week or so, I'd love the free extra serial number they're offering with each purchase for "a fellow carbon based life form." Thanks. We now return you to your regularly scheduled programming.

The Gnu Project has released version 4.0.0 of GCC, the GNU Compiler Collection. GCC contains frontends for C, C++, Objective C, Chill, Fortran, Ada, and Java as well as libraries for these languages. GCC's Java is a clean room implementation that doesn't use any Sun code, so it doesn't always exactly match Sun release versions, but this is roughly at the Java 1.4 level with some omissions. Verson 4.0 brings

a completely new optimization framework based on a higher level intermediate representation than the existing RTL representation. Numerous new code transformations based on the new framework are available in GCC 4.0, including:
  • Scalar replacement of aggregates
  • Constant propagation
  • Value range propagation
  • Partial redundancy elimination
  • Load and store motion
  • Strength reduction
  • Dead store elimination
  • Dead and unreachable code elimination
  • Autovectorization
  • Loop interchange
  • Tail recursion by accumulation

I'll be curious to see if this brings gcc performance back up to the level of the closed source compilers. Java Specific changes in 4.0 include:

  • In order to prevent naming conflicts with other implementations of these tools, some GCJ binaries have been renamed:
    • rmic is now grmic,
    • rmiregistry is now grmiregistry, and
    • jar is now fastjar.
    In particular, these names were problematic for the jpackage.org packaging conventions which install symlinks in /usr/bin that point to the preferred versions of these tools.
  • The -findirect-dispatch argument to the compiler now works and generates code following a new "binary compatibility" ABI. Code compiled this way follows the binary compatibility rules of the Java Language Specification.
  • libgcj now has support for using GCJ as a JIT, using the gnu.gcj.jit family of system properties.
  • libgcj can now find a shared library corresponding to the bytecode representation of a class. See the documentation for the new gcj-dbtool program, and the new gnu.gcj.precompiled.db.path system property.
  • There have been many improvements to the class library. Here are some highlights:
    • Much more of AWT and Swing exist.
    • Many new packages and classes were added, including java.util.regex, java.net.URI, javax.crypto, javax.crypto.interfaces, javax.crypto.spec, javax.net, javax.net.ssl, javax.security.auth, javax.security.auth.callback, javax.security.auth.login, javax.security.auth.x500, javax.security.sasl, org.ietf.jgss, javax.imageio, javax.imageio.event, javax.imageio.spi, javax.print, javax.print.attribute, javax.print.attribute.standard, javax.print.event, and javax.xml
    • Updated SAX and DOM, and imported GNU JAXP

Other notable improvements include support for Fortran 90 and Fortran 95.

I tried to build this on my Mac box to test gcj, but it died during make with the message "./config.status: line 910: ./../../config-ml.in: No such file or directory". I'll probably just wait till Tiger comes out at the end of the month, which ships gcc-4.0 by default.

Thursday, April 21, 2005

Cenqua has released Shaj, an open source Java+JNI library that enables Java applications to verify users with the underlying operating system. Shaj can also check group membership. Shaj supports Windows and Unix (PAM), and comes with pre-compiled JNI libraries for win32, Linux, Mac OS-X and Solaris. Shaj is written in C and Java, and supports Java 1.2 or later. Shaj is published under the Apache 2.0 License.

The Legion of the Bouncy Castle has released version 1.28 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.28 adds support for the GOST suite of cryptography algorithms, ISO 7816-4 padding, and the Whirlpool message digest. It also fixes various bugs. Download it while it's still legal.

Andrei Kouznetsov has released Unified I/O 2.23, 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 support for run length encoded streams.

Wednesday, April 20, 2005

The NetBeans Project has posted a new beta of profiler based on Sun Labs' JFluid. It can profile memory and CPU usage. New features in this beta include The new package features Java 5 and 6 support, a new installer, and a new control panel. NetBeans 4.0 or 4.1 is required.

YourKit, LLC has released YourKit Java Profiler 4.0.8, 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.8 adds suport for the NetBeans 4.1 beta and fixes bugs.

XDoclet 1.2.3 has been released. The web page aptly describes this:

XDoclet is an open source code generation engine. It enables Attribute-Oriented Programming for java. In short, this means that you can add more significance to your code by adding meta data (attributes) to your java sources. This is done in special JavaDoc tags.

XDoclet will parse your source files and generate many artifacts such as XML descriptors and/or source code from it. These files are generated from templates that use the information provided in the source code and its JavaDoc tags.

XDoclet lets you apply Continuous Integration in component-oriented development. Developers should concentrate their editing work on only one Java source file per component.

This approach has several benefits:

  1. You don't have to worry about out dating deployment meta-data whenever you touch the code. The deployment meta-data is continuously integrated.
  2. Working with only one file per component gives you a better overview of what you're doing. If your component consists of several files, it's easy to lose track. If you have ever written an Enterprise Java Bean, you know what we mean. A single EJB can typically consists of 7 or more files. With XDoclet you only maintain one of them, and the rest is generated.
  3. You dramatically reduce development time, and can concentrate on business logic, while XDoclet generates 85% of the code for you.

XDoclet requires an Ant based build system. 1.2.3 is a bug fix release.

Software 7 GmbH has released Helen 1.6, a tool for creating online help systems in JavaHelp format. Version 1.6 adds better integration with document management systems, improved printing, performance improvements, and better JCK-Support. Prices start at $169 for a single license, with discounts for multiple licenses. Upgrades from Helen 1.5 are free. Upgrades from 1.0 are $49.

The Jakarta Apache Project has posted the second 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."

Gaudenz Alder has released JGraph 5.4.7, a free-as-in-speech (Mozilla Public License/LGPL) graph component for Swing that requires Java 1.4 or later. JGraph is accompanied by Graphpad, an open-source diagram editor for Swing that offers Automatic Layout, Printing, Zoom, and much more. It is available in English, German and French. This release fixes a few bugs and improves the JavaDoc.

Tuesday, April 19, 2005

Microsoft is shipping beta 2 of Visual Studio 2005, which is good till May 1, 2006. They'll send you a free copy if you ask. I didn't order one, but my cat did. :-) There are also six express versions that are focused on individual langauges like C++, C#, and Visual Basic. These can be downloaded directly. The full version can only be ordered on disc. (I guess it was too big for Microsoft's web servers to handle.) The products seem to require registration for activation.

I'm pleased to announce that I'll be speaking at Software Development Best Practices in Boston in September. This will be my first time at this show since it was changed its name and focus from Software Development East. I'll be presenting four sessions:

I'll also be hosting a roundtable on "XForms, Web Forms, or What? The next generation of rich user interfaces". Anyone interested in particpating as a panelist around that table, should drop me a line.

Tim Boudreau's started work on a simple open source library for developing wizards in Swing.

Monday, April 18, 2005

Version 3.0.1 of  Hibernate, an open source (LGPL) object relational mapping system for Java, has been released. "Hibernate lets you develop persistent classes following common Java idiom - including association, inheritance, polymorphism, composition and the Java collections framework. The Hibernate Query Language, designed as a "minimal" object-oriented extension to SQL, provides an elegant bridge between the object and relational worlds. Hibernate also allows you to express queries using native SQL or Java-based Criteria and Example queries." 3.0.1 is a bug fix release.

Saturday, April 16, 2005

David Hovemeyer and Bill Pugh have posted FindBugs 0.8.7, an automated open source tool for finding potential bugs in Java code. This release includes several new detectors including:

I tested this release on the latest Jaxen code base. It found a few issues, including two possible genuine bugs. (Using == to compare Boolean objects. In context this was probably OK, but I wasn't absolutely sure of that so I went ahead and fixed them.) It also found a few places where the code was less than optimal: unnecessary object creation, inner classes that could be static, and the like. False positives were few, mostly involving circular dependencies between classes that don't really bother me.

Next I tried it out on the latest Jester code base. Here it found a few more serious problems. The worst of them were problems I already new about (excessive reliance on the classpath; too many calls to System.exit). However, FindBugs did show me exactly where in the code these bugs were arising. I hadn't bothered to track down yet so that was useful information.

Finally I ran it on XOM. Here it found a few performance issues in a part of the code I have been working on optimizing including one thing I didn't know I should be looking for: when iterating through a Map you can get an EntrySet that contains all mappings rather then grabbing the keys and looking up the value of each key individually. This can save a lot of lookup time. I probably should have learned that five years ago, but better late than never.

Bottom line: the better your code is, and the better a programmer you are, the less FindBugs will find. The searches it performs are relatively shallow and obvious. They tend to be things experienced Java developers already know not to do. Nonetheless, FindBugs is free and reasonably easy to use, despite a few GUI glitches. It's worth running across your code base every so often. Sometimes even if FindBugs doesn't find anything, inspecting its output will cause you to notice things you'd missed before. FindBugs requires Java 1.4 or later and is published under the LGPL.

Friday, April 15, 2005

Sun's posted the early draft review of JSR-244 Java™ 2 Platform, Enterprise Edition 5.0 (J2EE 5.0) Specification. New and revised APIs in J2EE 5.0 include:

Java 1.5 or later will be required for J2EE 5. Comments are due by May 6.

Sun has posted the first public review draft of JSR-245, JavaServer Pages 2.1, in the Java Community Process (JCP). According to the draft,

JSP 2.1 extends the JavaServer Pages 2.0 Specification (JSP 1.2) in the following ways:

  • The JSP specification now features a unified expression language, which is the result of the integration of the expression languages defined in the JSP 2.0 and Faces 1.1 specifications. The new unified expression language is defined in its own specification document, delivered along with the JSP 2.1 specification.
  • (PENDING)The JSP 2.1 specification requires the Java™ 2 Platform, Standard Edition version 1.4 or later for standalone containers, and version 5.0 for containers that are part of a Java 2 Enterprise Edition 5.0 environment. All JSP containers must be able to run in a J2SE 5.0 environment.
  • (PENDING)The JSP 2.1 specification uses the Servlet 2.5 specification for its web semantics.

Comments are due by May 16.

Sun has also posted the public review draft of JSR-252, JavaServer Faces 1.2. According to the preface, "Previous versions of the JavaServer Faces included an innovative, EL tailored to the needs of Faces. The main emphasis of this version of the Faces spec, and also the focus of the JSP spec corresponding to it, is to take those innovations and expose them to JSP page authors by creating a Unified EL that leverages the combined power of the Faces and JSP ELs. The Faces EL would then be deprecated, and the deprecated implementation would be written in terms of the Unified EL to preserve backwards compatability." Comments are due by May 16.

Sun has submitted JSR-273, Design-Time for JavaBeans (JBDT), to the Java Community Process. According to the JSR,

This JSR extends the JavaBeans specification and APIs to improve design-time functionality for use within IDEs.

Some key changes that are proposed are:

  • Add an API for richer design-time manipulation of JavaBeans in an IDE
  • Standardize common "extensions" to JavaBeans prevalent in current IDEs
  • Clean up and specify common meta-data used by many tool/component vendors in BeanInfo
  • Clarify expected behavior of IDEs with respect to PropertyEditors, Customizers, etc.
  • Possible: Investigate a JSP tag library design-time rendering scheme for IDEs

It was a key goal of this JSR to be incorporated into version 6.0 of the J2SE platform (Mustang), but this technology will likely have to be released standalone after Mustang. It hopefully will be rolled into the next release of the J2SE platform.

Comments are due by April 25.

Nokia and Motorola have submitted JSR 272, Mobile Broadcast Service API for Handheld Terminals, to the Java Community Process. "This specification will define an optional package in J2ME/MIDP/CLDC environment to provide functionality to handle broadcast content, e.g. to view digital television and to utilize its rich features and services."

Sun has posted the public review draft of JSR, Java Stream Assembly. This defines a javax.mediastream package for combining multiple audio, video, and text data streams sent over the channel roughly simultaneously. Comments are due by May 26.

Sun's posted a new maintenance review draft of JSR-1 Real-time Specification for Java . Many of the changes are purely editorial. However, there do appear to be a few substantive changes mixed in with all the typo corrections, particularly involving threading and synchronization. Comments are due by May 2.

Thursday, April 14, 2005

Ivan Moore has asked me to take over maintenance and adminstration of his open source Jester unit testing tool. I have a love-hate relationship with Jester. On the one hand, it's based on a brilliant, radical idea. The underlying approach (changing the code and seeing what doesn't break) almost always reveals interesting and useful information about your code base. At the same time, Jester is so incredibly difficult to configure and takes so long to run that I don't use it nearly as often as I should. My initial goal for the project is improving ease of use. I've already made some improvements to the Ant build file and the XML reports that you can now see in CVS. Next I hope to resolve some longstanding classpath issues so that not all jars need to be on the static classpath. I also hope to make it possible to run Jester on an existing source base rather than requiring a separate copy.

If you're interested in Jester, either as a user or a developer, I've set up jester-users and jester-devs mailing lists for ongoing discussion. Bug reports and feature requests should be entered in the appropriate sections on Sourceforge. Right now I'm focusing on the core of Jester. They're a few open RFEs that could easily be implemented independently if anyone's looking for a project. In particular, I think removing the dependence on mmmockobjects, and writing a Maven plug-in and an Ant task would be interesting initial tasks that don't require intimate knowledge of the Jester code base and algorithms, and could be executed fairly independently.

Cenqua has released Clover 1.3.6, a $250 payware unit test coverage tool. 1.3.6 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. Unfortunately this time it failed. Since the last time I ran it, I'd added a UnicodeUtil class with some very large switch statements, and Clover wasn't able to handle this. Possibly the addition of the instrumentation code pushed the methods over Java's maximum method size. I'll have to check with Cenqua and see if they can fix that. In the meantime, I excluded that class from the coverage tests, and reran Clover. This time it finished. There were a couple of surprises. First of all my code coverage numbers were way down, from well over 90% to just over 60%. The big problem was that the very large UnicodeUtil class was showing 0% coverage. Actually, it is tested. It's just that I had to exclude it from Clover coverage.

The second surprise was that Jaxen got pulled in and counted in my statistics. Previously it had been referenced as a third party JAR file. However, now I'm compiling the latest version from source and bundling a stripped down version straight into XOM. The results here were actually quite useful because they showed me a number of Jaxen classes and even entire packages that XOM wasn't actually using. I can exclude these from the finished JAR file, further reducing its size. By the time I was done I'd cut out three complete packages and six assorted classes in other packages. Clover also identified a number of unused methods in Jaxen I'd also like to drop from the internal version XOM uses, but I don't know any easy way to do remove these automatically. If anyone does, please holler.

I use Clover with Ant, but there are also versions for 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.

jutils.com has released lint4j 0.8, a free-beer "static Java source code analyzer that detects locking and threading issues, performance and scalability problems, and checks complex contracts such as Java serialization by performing type, data flow, and lock graph analysis." Version 0.8 adds class file introspection, multiple formatters in the Ant task, the ability to read source files from archives, and file-based checking. I tested this out on the Jester code base. lint4j found a couple of places where exceptions are being ignored, and a lot of places where System.exit is called. It's not immediately clear if any of these are real bugs or not. I'll have to investigate further.

Wednesday, April 13, 2005

The Apache Project has released MyFaces 1.0.9, an open source implementation of Java Server Faces that tries to avoid the use of servlet sessions or cookies for saving the client state.

Dan Creswell has released version 2.1.20 of the Blitz JavaSpaces Server Edition and version 1.0.8 of the pure Java edition. Blitz is an open source (BSD license) implementation of JavaSpaces that is Jini 2.0 enabled and implements smart indexing, tuneable persistence, and active/passive lease cleanup. These are bug fix releases.

Gaudenz Alder has released JGraph 5.4.6, a free-as-in-speech (Mozilla Public License/LGPL) graph component for Swing that requires Java 1.4 or later. JGraph is accompanied by Graphpad, an open-source diagram editor for Swing that offers Automatic Layout, Printing, Zoom, and much more. It is available in English, German and French. This release fixes a few bugs and improves the JavaDoc.

Tuesday, April 12, 2005

Several people pointed out that mandatory testing in Maven can be weakened by setting the maven.test.failure.ignore or maven.test.skip system properties. Thanks! That is helpful. However, I still think the default behavior is too draconian. It leads to people turning off breaking tests and forgetting about them rather than fixing them. Just this morning I found an example of that in Jaxen, where the test that should have caught a regression had been turned off some months ago to enable the build. Nobody remembered to turn it back on when we "fixed" the problem. Thus nobody noticed the problem still existed.

The Jakarta Apache Project has released version 5.5.9 of the Tomcat open source servlet container and official reference implementation of the Java Servlet API 2.4 and Java Server Pages (JSP) 2.0. This release is considered to be production worthy, and all 5.5.x users are encouraged to upgrade. "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."

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

According to the announcement, "Several minor issues have been fixed since RC1 and HttpClient 3.0 has made significant progess towards the final release. We are confident HttpClient 3.0 is ready to replace HttpClient 2.0 as a production quality release. We strongly recommend upgrading to HttpClient 3.0. Please download and enjoy."

Monday, April 11, 2005

The Apache Software Foundation has posted a "preview release" of Maven 2.0, an open source build tool for Java that's more declarative and less procedural than Ant. Maven is also much more authoritarian and less configurable than Ant. I've been using Maven lately as part of my work with the Jaxen project, and it has some nice features but I really can't recommend it. It's too controlling and I often find myself fighting against it. If your build process doesn't look like what Maven wants it to look like, you're going to be fighting against it. Maven's probably a little easier to set up than Ant for basic tasks like build, test, and deploy. However, as soon as you want to do something a little different than Maven expects, you're S.O.L. It's really Maven's way or the highway. According to the Maven site,

Maven 2.0 will feel very different to a Maven 1.0 user - and perhaps a little strange. But it is a lot simpler to work with! The key changes from Maven 1.0 are:

  • Faster and smaller - The Maven core no longer uses Ant, Jelly or Xerces making it much smaller, has fewer dependencies and is perfect for embedding in other tools.
  • Defined build lifecycle - No more prereqs, preGoals and postGoals. The build is a series of well defined phases. This also means that the normal goal names are not used - compile, test and install work for any project type.
  • Built-in multiple project handling - Use the same goals on a set of projects, and aggregate the results.
  • Improved SNAPSHOT handling - Snapshots are now checked for updates only once per day by default - though can be configured to be once per build, on a particular interval, or never. A command line option can force a check - making it more like updating from an SCM.
  • No more properties files - All plugins are now configured from the POM (which is now called pom.xml).
  • No more maven.xml - Plugins are now easier to build and integrate, and are the only way to script your builds. (Note that additions may later be made to the POM to allow simple things that scripting was used for, such as goal aliasing).
  • No more Jelly - Plugins are primarily written in Java, though there are providers for other scripting languages. This release includes support for Marmalade, a scripting framework that supports an XML syntax similar to Jelly which can be used to integrate Ant tasks and has a Jelly compatibility layer.
  • Improved repository layout - Maven 2.0 supports both the existing layout, and an improved repository layout that has deeper, partitioned structure making it easier to browse.

The elimination of Jelly and the use of Java should be a real improvement. Extending Maven 1.0 was vastly too difficult. If plug-ins existed to do what you wanted, it was no big deal. If not, you really didn't want to try writing your own. For instance, Maven supports the Clover code coverage tool I use for XOM but but not the Cobertura code coverage tool I use for Jaxen. It was easier to write a separate Ant build file just for test coverage than to write a Maven extension to support Cobertura.

On the other hand, I don't see any evidence that another major Maven flaw has been fixed. Maven 1.0 (and presumably 2.0) requires that all tests pass before it will do anything else: for instance, build a jar file or update a web page to correct a typo. That's just too extreme. Test driven programming is good, but one failing test should not break the build. In Maven it does.

Maven 2.0 is not ready for production use yet. For instance, it doesn't support any plug-ins, and there quite a few major, unresolved bugs; so even if you are happily using Maven today, I don't recommend moving to 2.0 just yet. However, 2.0 looks promising and does address a lot (if not quite all) of the complaints I have about Maven 1.0.

Ben Litchfield has posted PDFBox 0.7.1, an open source (BSD license) Java library for manipulating PDF documents and extracting contents from existing PDF documents. This is a bug fix release.

Filip Pizlo has posted version 0.0.4 of the Profiler That Doesn't Suck , a free-as-in-speech (GPL) profiler for Java. It has the useful ability to measure the memory usage of individual objects. This release adds quite a bit of functionality.

Saturday, April 9, 2005

IBM's alphaWorks has released HeapAnalyzer 1.3.5, 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."

Friday, April 8, 2005

Jim Menard has posted version 0.9.3 of DataVision, an open source "database reporting tool similar to Crystal Reports". DataVision is written in Java and supports multiple databases including PostgreSQL, MySQL, and Oracle. This release fixes bugs. DataVision is published under an Apache license.

No Magic has released MagicDraw UML 9.5, a $149 to $2549 payware "visual UML modeling and CASE tool with teamwork support." 9.5 mainly focuses on improves integration with Eclipse.

Thursday, April 7, 2005

Version JSR 1 of Groovy has been posted. Apparently Groovy has now split into two versions, a so-called "classic" version and the new one being developed in the Java Community Process (JCP). This is the first release based on the latter. Groovy is a JVM hosted scripting language that combines the speed of GW-Basic with the clarity of Perl. "This new version contains many bug fixes, and the new parser implements a fair number of the decisions that have been taken as part of the JSR process for standardizing the Groovy scripting language." Notable changes include:

Rob Lougher has released JamVM 1.3.0, a free (GPL) Java Virtual Machine that "conforms to the JVM specification version 2 (blue book). In comparison to most other VM's (free and commercial) it is extremely small, with a stripped executable on PowerPC of only ~100K, and Intel 80K. However, unlike other small VMs (e.g. KVM) it is designed to support the full specification, and includes support for object finalisation, the Java Native Interface (JNI) and the Reflection API." Like most free VMs it relies on the GNU Classpath library. 1.3.0 speeds up code execution and has now been ported to Mac OS X/Darwin. JamVM only interprets code. It does not have a Just-In-Time compiler.

Oliver Burn has posted the first beta Checkstyle 4.0, a lint-like tool that checks Java code for adherence to various coding standards. Version 4.0 adds support for Java 1.5.

Version 3.0.7 of EJBCA, an open source, Java 2 Enterprise Edition (J2EE) Certificate Authority, has been released. EJBCA can be used standalone or integrated into other J2EE application. It supports multiple levels of certificate authorities, individual enrollment and batch production of certificates, PKCS12 and PEM export, configurable certificate contents. revocation and certificate revocation lists, and more. Version 3.0.7 is a bug fix release. EJBCA is published under the LGPL.

Teodor Danciu's posted version 0.6.6 of JasperReports, an open source (LGPL) Java library for generating reports from XML templates and customizable data sources (including JDBC). The output can be displayed on the screen, printed, or written to XML or PDF files. Version 0.6.6 adds support for Groovy and other languages.

Gaudenz Alder has released JGraph 5.4.5, a free-as-in-speech (Mozilla Public License/LGPL) graph component for Swing that requires Java 1.4 or later. JGraph is accompanied by Graphpad, an open-source diagram editor for Swing that offers Automatic Layout, Printing, Zoom, and much more. It is available in English, German and French. This release fixes a few bugs and adds some small features and API.

Jayasoft has posted Ivy 0.9, a free Java based dependency manager, that features transitive dependencies, Ant integration, Maven compatibility, and continuous integration. Personally I'm trying to eliminate dependencies from my code lately. I just spent quite a bit of effort to remove some of the dom4j dependencies from the core Jaxen code base so it could run out of the box on Java 1.4 and later without any etxra JAR files. The fewer dependencies a code base has, the easier it is to build, install, and deploy.

Ewan Mellor has released the CHIP Code Highlighter 2.6.0, a syntax colorer written in PHP and designed to be used on Web servers. It supports C, C++, Java, Lisp, Python, PHP, HTML, and JavaScript code. Version 2.60 adds the ability to isable or configure page-entry transitions. CHIP is released under an MIT/X license.

Websina has released BugZero 4.0, 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. 4.0 enables single sign-on and external authentication schemes.

Wednesday, April 6, 2005

Subversion 1.1.4, an open source version control system designed to replace CVS, has been released. 1.1.4 is a bug fix release.

Tuesday, April 5, 2005

The Eclipse Project has posted the sixth 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 support for Java 1.5. New SWT features in this milestone include:

New IDE features include:

Speaking of Eclipse, I'd like to announce the first iteration of EclipseWorld, an end-user focused Eclipse conference. BZ Media is producing EclipseWorld here in New York City August 29-31 at the Roosevelt Hotel. I've signed on to do four presentations:

If you have something interesting to say about subjects Eclipse-related, speaker abstracts are being accepted till April 18.

Monday, April 4, 2005

Conversational Computing Corporation has posted the first public working draft of Java Specification Request 113, the Java Speech API 2.0. According to the draft,

The Java Speech API (JSAPI 2.0) allows developers to incorporate speech technology into user interfaces for their Java programming language applets (or MIDlets) and applications. This API specifies a cross-platform interface to support command and control recognizers and speech synthesizers, with considerations for future incorporation of dictation and other features.

JSAPI 2.0 is primarily aimed at the J2ME platform (specifically CLDC 1.0 and MIDP 1.0). At first glance the API may look large, but it can be scaled in several ways. First, implementations may choose to implement recognition, synthesis, or both. Second, the types of engines used may be small or large depending on their capabilities. Recognition engines may provide full support for command and control or provide more limited support through specialized built-in grammars. Synthesis engines may support full text-to-speech capabilities or audio sequencing only.

At the same time, it has been designed to work well on J2SE. The subset of capabilities used from J2ME also work equally well on J2SE. A few very small building blocks have been included in the API to not only support this compatibility, but to also aid the developer with familiar programming methods and save space by using reusable objects.

JSAPI 2.0 has a large number of uses. It is designed to support not only the limited cases of name dialing and digit dialing, but the following applications as well (to name a few):

  • Application switching
  • E-mail interaction including both reading and manipulation
  • Calendar management and interaction
  • Accessibility including screen reading
  • System alerts including low memory or low fuel
  • Car navigation system
  • Games
  • Learning
  • Data entry

JSAPI 2.0 is especially well suited for downloadable applications

Comments are due by April 23.

Saturday, April 2, 2005

Novell has released Mono 1.1.6, an open source implementation of Microsoft's .NET framework that runs on Linux, Unix, Mac OS X, and Windows. Mono includes an ECMA Common Language Infrastructure (CLI) runtime engine, a cross platform IKVM Java runtime engine, a C# 1.0 compiler, class libraries implementing the .NET 1.1 profile, the Gtk# 1.0 GUI programming toolkit, GNU Classpath for the CLI and a Visual Basic runtime. Version 1.1.6 adds support for Mac G3's and fixes bugs.

Friday, April 1, 2005

The Apache Project has posted the first beta of Ant 1.6.3, the popular open source build tool. Version 1.6.3 is a bug fix release.

The Big Faceless Organization has released the Big Faceless PDF Library 2.3.6, 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.6 adds support for interlaced PNG images and fixes bugs. Java 1.2 or later is required.

Older news:

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