May 2002 Java News

Thursday, May 30, 2002

I'm travelling this weekend so updates may be a little slow until Monday.


ej-technologies's JProfiler 1.2.1 is a $99 payware dynamic profiler based on the Java virtual machine profiling interface (JVMPI). It is targeted at J2EE and J2SE applications, and features CPU profiling, memory profiling, thread profiling, and VM telemetry information.


S. A. Samokhodkin's JRegex 1.2_00 is an open source regular expression library for Java that supports Perl 5.6 regexp syntax including Unicode. Java 1.1 or later is required.


JDebugTool 1.4 is a standalone graphical Java debugger built on top of the Java Platform Debugger Architecture (JPDA). Version 1.4 adds hot swapping of classes: "fix a bug, reload the class, and continue debugging." The user interface has also been cleaned up. JDebugTool is $99 payware.

Wednesday, May 29, 2002

The The Zaval CE Group's Zaval JRC Editor is a visual localization string editor. In rough scope it reminds me of the old Macintosh tool ResEdit, in particular because it allows you to hack the strings inside a closed source application. ResEdit actually went further, letting you hack all sorts of resources including dialogs, icons, menus, and more; all without knowing or using any C or Pascal. Almost 20 years later, the rest of the world still hasn't caught up to where Macintosh software development was in the 1980s. :-( Zaval is published under the GPL.


Sun has submitted Java Specification Request (JSR) 188, CC/PP Processing, to the Java Community Process (JCP). According to the JSR,

Delivery context is a set of attributes that characterizes the capabilities of the access mechanism and the preferences of the user [1]. An access mechanism is a combination of hardware (including one or more devices and network connections) and software (including one or more user agents) that allows a user to perceive and interact with the Web using one or more interaction modalities (sight, sound, keyboard, voice etc.) [1]. Web servers and applications that adapt content for multiple access mechanisms must be sensitive to delivery context.

Composite Capability/Preference Profiles (CC/PP) [2] has been established as the industry standard for describing delivery context. User Agent Profile (UAProf) [3] is based on CC/PP and has been embraced by the WAP community including gateway vendors and handset manufacturers who have embedded UAProf into their products.

This specification will define a set of APIs to process delivery context information in CC/PP.

...

This specification will provide the Java community with a standard set of APIs for processing delivery context information that is compatible with the vast majority of web access mechanisms that participate in delivery context negotiation. This will allow Java developers to write device independent code that can deliver content to a multitude of web access mechanisms while reducing development costs, and will help to avoid a proliferation of proprietary and potentially incompatible implementations.

Web servers and applications will be able to use this API to optimally adapt content for individual access mechanisms. J2EE™ Client Provisioning servers will be able to use this API to help determine the appropriate client application to provision. Portal servers will be able to use this API to adapt content and pass on delivery context information to portlets that would adapt their behavior accordingly.

Comments are due by June 10.


Lots more suggestions came in yesterday about testing memory usage. I'll be trying some of them out today. The fundamental problem right now seems to be that the results aren't reproducible. One run I'll get 60K. The next run I'll get 0K. The run after that it may drop into the negative numbers. Consequently I have very little confidence that any of these numbers mean anything. I am not at all sure that freeMemory() and totalMemory() are reporting accurate or precise values. What's really needed is a tool that locks down the heap and then calculates the deep size of an object by walking its tree and adding up the size in the heap of that object, all the objects it references, all the objects they reference, and so on. OptimizeIt will report the shallow size but not the deep size.


Major thanks are due to Robert M. Lefkowitz for helping me finally get XFree86 4.2.0 to run at 1600x1024. I can now report that it is definitely possible to use the SGI 1600SW flat panel monitor with an ATI Radeon 7500 graphics card. It's just a simple matter of figuring out the correct mode lines in the config file. (That's sort of like saying breaking AES is just a simple matter of determining the right 128-bit key.) Robert sent me his XF86Config-4 file which I was able to adapt to my configuration. In case anyone else is stuck with this problem here's the config file I'm using now. My last remaining major problem is getting Linux to recognize the on-board SiS sound chip on the ECS K7S5A motherboard. However, that shouldn't be as hard; and if I have any major problems I can just add a cheap sound card that I know is supported.

Wednesday, May 29, 2002

Sun's posted the binary reference implementation of the Java Management Extensions (JMXTM) 1.1.

Tuesday, May 28, 2002

Various people sent in numerous helpful suggestions about my benchmarking problem yesterday. The most common suggestion was to parse the document twice and only measure the change after the second parse so I would be measuring the size of the object rather than the size of the object+classes.

Gary Hirschhorn suggested that I do three consecutive System.gc() calls to get an accurate memory count of live objects. According to him, "because of the nature of the garbage collection algorithms used in Java (where speed is generally more important that getting every last object cleaned up), it is possible that a single call does not completely clean up memory. In practice, I find that more than three consecutive calls is rarely, if ever, needed."

Jochen Bedersdorfer suggested calling Thread.yield() or Thread.sleep() after calling System.gc(). I'm not sure Thread.yield() would help because the main thread would still have higher priority than garbage collection. However, Thread.sleep() might be a good idea. He also suggested using Also using -Xincgc which I haven't tried yet.

I revised the program to incorporate the above suggestions, and now I'm more confused than ever (which is a good thing. It's much better to know you don't understand what's going on than to think you do when you really don't). The revised program is extremely sensitive to exactly when garbage is collected. In particualr if I run a garbage collection cycle immediately after parsing the second document, the memory change drops to zero or even negative despite my efforts to make sure the objects I need to measure are still live. The results can vary greatly from one run to the next. Anyway, here's the revised code. Suggestions are still much appreciated.

import javax.xml.parsers.*; // JAXP
import org.xml.sax.SAXException;
import org.w3c.dom.Document;
import java.io.IOException;


public class DocumentMeasure {

  public static Document doc = null;
  
  public static void main(String[] args) {
    
    String document = "http://www.w3.org/TR/2000/REC-xml-20001006.xml";
    if (args.length > 0) {
      document = args[0]; 
    }
    
    Runtime runtime = Runtime.getRuntime();
    
    try {
     DocumentBuilderFactory factory 
       = DocumentBuilderFactory.newInstance();
     System.out.println(factory.getClass());
     factory.setNamespaceAware(true);
     DocumentBuilder parser = factory.newDocumentBuilder();
     // Make sure we load all the classes we're going to load
     doc = parser.parse(document);
     
     // Null out the objects we don't need and garbage collect
     doc = null;
     factory = null;
     collectGarbage();

     // Now we do it for real and measure the resulting change
     long initialSize = runtime.totalMemory() - runtime.freeMemory();
     doc = parser.parse(document);
     // Why can't I garbage collect here????
     collectGarbage();
     long finalSize = runtime.totalMemory() - runtime.freeMemory();
     System.out.println((finalSize - initialSize) / 1024.0);
     
     // We need to use the document here or it may have gotten
     // itself garbage collected before measuring:
     System.out.println(doc.getDocumentElement());
     System.out.println(parser.getClass());
     
    }
    catch (Exception e) {
      System.out.println(e);
    }

  }

  private static void collectGarbage() {
    
    System.gc();
    try {
      // Give the garbage collector time to work
      Thread.sleep(1000);
    }
    catch (InterruptedException e) {
      // just continue
    }
    System.gc();
    try {
      // Give the garbage collector time to work
      Thread.sleep(1000);
    }
    catch (InterruptedException e) {
      // just continue
    }
    System.gc();
    try {
      // Give the garbage collector time to work
      Thread.sleep(1000);
    }
    catch (InterruptedException e) {
      // just continue
    }
    
  }
  
}
Monday, May 27, 2002

Back in December I asked how one might measure the actual size in memory of a particular Java object and its components. I still don't know how to do exactly that. The most common suggestion seemed to be to measure the heap size before and after the object was allocated, and I was finally able to do that much.

To test the memory usage of various implementations, I wrote a simple program that loaded the XML specification, 2nd edition, into a DOM Document object. The spec's text format is 197K (not including the DTD which adds another 56K, but isn't really modeled by DOM at all). Here's the approximate amount of memory used by the Document objects built from this file by several parsers:

  • Xerces-J 2.0.1: 1489K

  • Crimson 1.1.3 (JDK 1.4 default): 1230K

  • Oracle XML Parser for Java 9.2.0.2.0: 2500K

I used a couple of different techniques to measure the memory used. In one case I used OptimizeIt and the Java Virtual machine Profiling Interface (JVMPI) to check the heap size. I ran the program both with and without loading the document. I subtracted the total heap memory used without loading the document from the memory used when the document was loaded to get the numbers reported above. In the other test, I used the Runtime class to measure the total memory and the free memory before and after the Document was created. In both cases, I garbage collected before taking the final measurements. The results from the separate tests were within 15% of each other. All tests were performed in Sun's JDK 1.4.0 using Hotspot on Windows NT 4.0SP6.

I don't claim these numbers are perfect, and I certainly don't think this one test document justifies any claims whatsoever about the relative efficiency of the different DOM implementations. The difference between Crimson and Xerces is well within my margin of error. A more serious test would have to look at how the different implementations scale with the size of the initial document, and perhaps graph the curves of memory size vs. file size. For instance, it's possible that each of these requires a minimum of 1024K per document, but grows relatively slowly after that point. I did run the same tests on a minimal document that contained a single empty element. The results raged from 3K to 131K for this document. However, these numbers were extremely sensitive to exactly when and how garbage was collected. I wouldn't claim the results are accurate to better than 300K. However, I do think that together these tests demonstrate just how inefficient DOM tends to be.

Here's one of the two programs I used to make the tests. If anybody has any comments on how I can improve the test, I'd appreciate hearing about it. I'm particularly concerned with when, where and how to garbage collect since that seemed to have a noticeable impact on the final numbers.

import javax.xml.parsers.*; // JAXP
import org.xml.sax.SAXException;
import org.w3c.dom.Document;
import java.io.IOException;


public class DocumentMeasure {

  public static Document doc = null;
  
  public static void main(String[] args) {
     
    
    String document = "http://www.w3.org/TR/2000/REC-xml-20001006.xml";
    if (args.length > 0) {
      document = args[0]; 
    }
    
    Runtime runtime = Runtime.getRuntime();
    
    try {
     DocumentBuilderFactory factory 
       = DocumentBuilderFactory.newInstance();
     System.out.println(factory.getClass());
     factory.setNamespaceAware(true);
     DocumentBuilder parser = factory.newDocumentBuilder();
     factory = null;
     System.gc();
     long initialSize = runtime.totalMemory() - runtime.freeMemory();
     doc = parser.parse(document);
     System.gc();
     long finalSize = runtime.totalMemory() - runtime.freeMemory();
     System.out.println((finalSize - initialSize) / 1024);
    }
    catch (Exception e) {
      System.out.println(e);
    }

  }

}
Sunday, May 26, 2002

Sun's posted the initial public review draft specification for Java Specification Request (JSR) 120 Wireless Messaging API (WMA) in the Java Community Process (JCP). This is a set of APIs that provides access to wireless communication resources. The WMA is designed to run on Java 2 Micro Edition (J2ME) configurations. Comments are due by June 23, 2002.


The maintenance review draft specification for JavaServer Pages 1.2 has been posted in the JCP. The changes look quite minor and mostly focus on errata. Comments are due by June 23, 2002.

Saturday, May 25, 2002

Hendrik Schreiber's GCViewer is a GUI program for visualizing the verbose garbage collection output generated by the IBM and Sun Java VMs 1.3 and later. The data can also be exported as comma separated values (What? No XML?) for import into spreadsheets.


Hibernate 0.9.13 is an "object/relational persistence and query service for Java. Hibernate lets you develop persistent objects following common Java idiom, including association, inheritence, polymorphism, composition and the Java collections framework. No code generation or bytecode processing is required. Instead, in pursuit of a shorter build procedure, runtime reflection is used. Hibernate supports Oracle, DB2, MySQL, PostgreSQL, Sybase, MS SQL Server, Mckoi SQL, Progress, HypersonicSQL, and Interbase."

Friday, May 24, 2002

Israel Olalla's open source Jcrontab 1.0RC implements a cron system in Java. "The classes are be fully embeddable and could be used in any project. It provides a servlet to be integrated with app-servers (Tomcat, resin, Jetty, etc.) with a load-on-startup servlet. It reads and stores the crontab table from a file but is designed to include EJB and any other DataSource. It includes a minimal Web interface, and is written to get maximum efficience and performance." Jcrontab is published under the LGPL.


The Apache Jakarta Project has released log4j 1.2.2, a logging package for Java that allows developers to enable logging at runtime without modifying the application binary. Version 1.2.2 has slightly more robust class loading behavior for logging classes.


Bill Hahn's  DbForms 1.1.2 is an open source rapid application development tool for Java Server Pages (JSP) based on the Model-View-Controller architecture.

Thursday, May 23, 2002

The JBoss Project has posted the third release candidate of  JBoss 3.0.0 as well as a bug fix release (2.4.6) of JBoss 2.x. JBoss is an open source Enterprise JavaBeans application server implemented in pure Java. JBoss provides JBossServer, the basic EJB container and JMX infrastructure, JBossMQ for JMS messaging, JBossMail for mail, JBossTX for JTA/JTS transactions, JBossSX for JAAS based security, JBossCX for JCA connectivity, and JBossCMP for CMP persistence. It integrates with Tomcat Servlet/JSP container and Jetty Web server/servlet container, and enables you to mix and match these components through JMX by replacing any component you wish with a JMX-compliant implementation for the same APIs.


Abbot 0.6 is a framework for testing Java GUIs. Using simple XML-based scripts, you can launch a GUI, play back arbitrary user actions on it, and examine its state. It also includes the Costello editor which facilitates creating, debugging, and modifying scripts. Abbot and Costello are published under the LGPL.


Darrrell Waliser's Ick is an import management tool that examines Java source code and infers the required import statements. Ick is published under the GPL.


Hendrik Schreiber's jo! is a pure Java web server that implements the Servlet API 2.2, Java Server Pages 1.1, and HTTP/1.1. It supports server side includes, virtual hosts, memory sensitive file cache, authentication using a role abstraction, automatic compressed transfer of text or HTML files, auto internationalization, auto servlet and JSP reloading, auto reload of WARs, hot deployment of WARs, and a Swing console.


jPOS 1.4.2 has been released. jPOS is an "ISO-8583 library/framework that can be used to implement financial interchanges, protocol converters, payment gateways, credit card verification clients and servers (merchant/issuer/acquirer)." Version 1.4.2 adds support for key management and MAC and PIN encryption.


Nathan Fiedler's JSwat 2.4 is 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.4 adds a label at the bottom of the window to show notices and warnings as well as various bug fixes. JSwat is published under the GPL.


Sun's released version 1.1.1_01 of the Java Advanced Imaging API to add support for little-endian TIFF and the Wireless Bitmap format as well as fix a few bugs.

Wednesday, May 22, 2002

I'm still trying to get XFree86 to recognize my SGI 1600SW widescreen display. The Xig folks think they can handle it, but Xig wasn't able to install on Mandrake 8.2. Seems I need the source code for the kernel so xsvc can be recompiled, but when I attempt to install it from the CD, I get fsck errors when I get to the disk formatting step (not that I need to format the disks but the installer doesn't seem to let me skip that step, even when I tell it I only want to add packages.) I did finally manage to figure out how to switch the display into 1280 by 1024 instead of 1024 by 768. However, that's actually worse because it distorts the screen 25% instead of 17%. The difference is very noticeable. I've seen evidence that some people have gotten 1600 by 1024 out of this display on Linux, but it's not clear if anyone's done it with an ATI 7500 Radeon video card. Suggestions are still appreciated.


From the realm of things I didn't think would be possible comes Michael B. Allen's jCIFS 0.6.4, an SMB client library written in pure Java. It supports Unicode, named pipes, batching, multiplexing I/O of threaded callers, encrypted authentication, full transactions, domain/workgroup/host/share/file enumeration, NetBIOS sockets and name services, the smb:// URL protocol handler, RAP calls, and more. The API is similar to java.io.File. jCIFS is published under the LGPL.


Robert Olofsson's JMP 0.16 uses the Java Virtual machine Profiling Interface (JVMPI) to track objects and method times . It uses a GTK+ interface to display statistics. The current instance count and the total amount of memory for each class is shown as is the total time spent in each method.


Chris Nokleberg's Sixlegs PNG Library 1.2.3  is a Java 1.1-compatible PNG decoder. It supports all valid bit depths (grayscale/color), interlacing, palette-indexed images, alpha/transparency, gamma correction, access to all standard chunk data, private chunk handling, progressive display, and more. It is published under the LGPL.


The first beta release of the wingS 1.0 servlet development framework has been posted. wingS features a Swing like API, using Swing models and event listeners. Most Swing Components (JTree, JMenu, etc.) have a wingS pendant (STree, SMenu, etc.). wingS uis published under the GNU Lesser General Public License.


Sun's posted the first proposed final draft specification of the Java 2 Micro Edition (J2ME) Personal Basis Profile 1.0 to the Java Community Process. This "provides an application environment for AWT-based applications that rely solely upon lightweight components. It provides basic AWT support but excludes support for the AWT heavyweight widgets themselves. This Profile serves as a basis on which user interface libraries such as HAVi UI or other lightweight toolkits may be built, and encompasses the core AWT functionality of the J2ME Personal Profile." It is based upon J2ME Foundation Profile 1.0, and is is a subset of the J2ME Personal Profile 1.0.


Jason Hiatt's JavaSwitch 1.4 allows you to an IRC server, HTTP server, and a POP3, SMTP, Telnet, IMAP, or FTP server on the same port. This might be useful if you're behind a firewall with only one port open.

Tuesday, May 21, 2002

I thought today I'd post a short fable that I wrote for the Preface of Processing XML with Java:

One night five developers, all of whom wore very thick glasses and had recently been hired by Elephants Inc., the world's largest online purveyor of elephants and elephant supplies, were familiarizing themselves with the company's order processing system when they stumbled into a directory full of XML documents on the main server. “What's this?”, the team leader asked excitedly. None of them had ever heard of XML before so they decided to split up the files between them, and try to figure out just what this strange and wondrous new technology actually was.

The first developer, who specialized in optimizing Oracle databases, printed out a stack of FMPXMLRESULT documents generated by the FileMaker database where all the orders were stored, and began poring over them. "So this is XML! Why, it's nothing novel. As anyone can see who's able, an XML document is nothing but a table!"

“What do you mean, a table?” replied the second programmer, well versed in object oriented theory and occupied with a collection of XMI documents representing UML diagrams for the system. “Even a Visual Basic programmer could see that XML documents aren't tables. Tables can't contain duplicates! These are more like objects and classes. Indeed, that's it exactly. An XML document is an object and a DTD is a class.”

“Objects? A strange kind of object, indeed!” said the third developer, a web designer of some renown, who had loaded the XHTML user documentation for the order processing system into Mozilla. “I don't see any types at all. If you think this is an object, I don't want to install your software. But with all those stylesheets there, it should be clear to anyone not sedated, that XML is just HTML updated!”

“HTML? You must be joking” said the fourth, a computer science professor on sabbatical from MIT, who was engrossed in an XSLT stylesheet that validated all the other documents against a Schematron schema. “Look at the clean nesting of hierarchical structures, each tag matching its partner as it should. I've never seen HTML that looks this good. Clearly what we have here is S-expressions which is certainly nothing new. Babbage invented this back in 1882!”

“S expressions?” queried the technical writer, who was occupied with technical documentation for the project written in DocBook. “I've never heard of such a thing. To me, this looks just like a FrameMaker MIF file, though finding the GUI does seem to be taking me awhile.”

And so they argued into the night, none of them willing to give an inch, all of them presenting still more examples to prove their points, none of them bothering to look at the others' examples.

If the moral of this little story hasn't hit you over the head yet, you can keep reading in the recently posted Preface of Processing XML with Java. As usual, all comments are appreciated.

Monday, May 20, 2002

Sun's posted the proposed final draft of Java Specification Request (JSR) 40, the Java Metadata Interface 1.0 in PDF format to the Java Community Process. This defines a Java API for the Object Management Group's UML-based Meta Object Facility. According to the draft spec,

The Java™ Metadata Interface (JMI) Specification defines a dynamic, platform-neutral infrastructure that enables the creation, storage, access, discovery, and exchange of metadata. JMI is based on the Meta Object Facility (MOF) specification from the Object Management Group (OMG), an industry-endorsed standard for metadata management.

The MOF standard provides an open-ended information modeling capability, and consists of a base set of metamodeling constructs used to describe technologies and application domains, and a mapping of those constructs to CORBA IDL (Interface Definition Language) for automatically generating model-specific APIs. The MOF also defines a reflective programming capability that allows for applications to query a model at run time to determine the structure and semantics of the modeled system. JMI defines a Java mapping for the MOF.

As the Java language mapping to MOF, JMI provides a common Java programming model for metadata access for the Java platform. JMI provides a natural and easy-to-use mapping from a MOF-compliant data abstraction (usually defined in UML) to the Java programming language. Using JMI, applications and tools which specify their metamodels using MOF-compliant Unified Modeling Language (UML) can have the Java interfaces to the models automatically generated. Further, metamodel and metadata interchange via XML is enabled by JMI's use of the XML Metadata Interchange (XMI) specification, an XML-based mechanism for interchanging metamodel information among applications. Java applications can create, update, delete, and retrieve information contained in a JMI compliant metadata service. The flexibility and extensibility of the MOF allows JMI to be used in a wide range of usage scenarios.


JFreeReport 0.7.2 is a report generator that takes JTable data and sends reports to the screen (print preview), the printer, or an Acrobat PDF file. Support is included for report headers and footers, grouping, functions etc. JFreeReport is published under the GNU Lesser General Public Licence.

Sunday, May 19, 2002

I recently bought a new PC which is going to become my main workstation, and I had hoped I was going to be able to run Linux on it as the primary OS. I did manage to get Mandrake 8.2 installed after only two attempts! Things are much improved since the last time a I did this a year ago. Then it took another seven or eight tries to get it to dual boot Windows 2000. Windows and Linux really don't play well together. Windows refuses to acknowledge Linux's existence and LILO is quite fond of overwriting critical Windows information. If you're doing this yourself, make sure you Windows first.

The next problem is getting Linux and XFree86 4.2.0 to drive my SGI 1600 widescreen flat panel display through the multilink adapter. I have an ATI Radeon 7500 card that supports DVI out at the necessary resolution. I've gotten the flat panel to work in Windows. However, in Linux I'm limited to 1280 by 1024. Google searches show lots of people have had problems with this combination. If anybody has actually gotten this combination or something close to it to work, I'd really appreciate hearing about it. Alternately, as a fallback position, does anyone know a graphics card vendor that actively supports Linux as opposed to leaving it to third parties to figure out?

Monday, May 20, 2002

Sun's posted the proposed final draft of Java Specification Request (JSR) 40, the Java Metadata Interface 1.0 in PDF format to the Java Community Process. This defines a Java API for the Object Management Group's UML-based Meta Object Facility. According to the draft spec,

The Java™ Metadata Interface (JMI) Specification defines a dynamic, platform-neutral infrastructure that enables the creation, storage, access, discovery, and exchange of metadata. JMI is based on the Meta Object Facility (MOF) specification from the Object Management Group (OMG), an industry-endorsed standard for metadata management.

The MOF standard provides an open-ended information modeling capability, and consists of a base set of metamodeling constructs used to describe technologies and application domains, and a mapping of those constructs to CORBA IDL (Interface Definition Language) for automatically generating model-specific APIs. The MOF also defines a reflective programming capability that allows for applications to query a model at run time to determine the structure and semantics of the modeled system. JMI defines a Java mapping for the MOF.

As the Java language mapping to MOF, JMI provides a common Java programming model for metadata access for the Java platform. JMI provides a natural and easy-to-use mapping from a MOF-compliant data abstraction (usually defined in UML) to the Java programming language. Using JMI, applications and tools which specify their metamodels using MOF-compliant Unified Modeling Language (UML) can have the Java interfaces to the models automatically generated. Further, metamodel and metadata interchange via XML is enabled by JMI's use of the XML Metadata Interchange (XMI) specification, an XML-based mechanism for interchanging metamodel information among applications. Java applications can create, update, delete, and retrieve information contained in a JMI compliant metadata service. The flexibility and extensibility of the MOF allows JMI to be used in a wide range of usage scenarios.


JFreeReport 0.7.2 is a report generator that takes JTable data and sends reports to the screen (print preview), the printer, or an Acrobat PDF file. Support is included for report headers and footers, grouping, functions etc. JFreeReport is published under the GNU Lesser General Public Licence.

Sunday, May 19, 2002

I recently bought a new PC which is going to become my main workstation, and I had hoped I was going to be able to run Linux on it as the primary OS. I did manage to get Mandrake 8.2 installed after only two attempts! Things are much improved since the last time a I did this a year ago. Then it took another seven or eight tries to get it to dual boot Windows 2000. Windows and Linux really don't play well together. Windows refuses to acknowledge Linux's existence and LILO is quite fond of overwriting critical Windows information. If you're doing this yourself, make sure you Windows first.

The next problem is getting Linux and XFree86 4.2.0 to drive my SGI 1600 widescreen flat panel display through the multilink adapter. I have an ATI Radeon 7500 card that supports DVI out at the necessary resolution. I've gotten the flat panel to work in Windows. However, in Linux I'm limited to 1280 by 1024. Google searches show lots of people have had problems with this combination. If anybody has actually gotten this combination or something close to it to work, I'd really appreciate hearing about it. Alternately, as a fallback position, does anyone know a graphics card vendor that actively supports Linux as opposed to leaving it to third parties to figure out?

Saturday, May 18, 2002

The Apache Jakarta Project has released log4j 1.2.1, a logging package for Java that allows developers to enable logging at runtime without modifying the application binary. Version 1.2.1 fixes one nasty bug in 1.2. No new functionality is added.

Friday, May 17, 2002

Panasonic Information and Networking Technologies has submitted Java Specification Request (JSR) 187, JAIN Instant Messaging to the Java Community Process (JCP). JAIN Instant Messaging is a "protocol agnostic API for Instant Messaging" that seeks to offer "a standard portable and secure interface to control, manage and manipulate instant messages between clients through the use of presence servers." According to the JSR, JAIN Instant Messaging "is intended to be the standard API to implement Instant Messaging applications and services for both IP and legacy based networks. It is expected to be bound to a plethora of messaging and transport protocols such as SMS, MMS, WAP, WSP, HTTP, HTTPS, etc. Due to its protocol neutrality, JAIN Instant Messaging will be deployed in the existing and future, wire-line and wireless networks."

Panasonic Information and Networking Technologies has also submitted JSR-186 JAIN Presence to the JCP. According to the JSR,

Presence is the notion of an entity being a part of a network. The entity can be a mobile device, a PC, a telephone, etc. Concepts important to Presence would be when an entity enters and exits a network, and relevant information about the entity such as location, duration, relationship to other entities, etc.

This JSR addresses Presence as viewed from the entity, that is, when and how a device enters and exits a network. JSR 123 - Presence, Availability, and Management (JAINTM PAM) address the needs and concerns of Presence for a server within a network. This JSR addresses the interfaces required for a client.

There are several industry specifications defining Presence based on protocols such as Wireless village, SIMPLE, Jabber, AIM, MSN, Yahoo! Etc. This JSR will define an interface agnostic to protocols. JAIN Presence is intended to be the standard API to write presence applications and services for both IP and legacy based networks. It is expected to be bound to a plethora of messaging and transport protocols such as SMS, MMS, WAP, WSP, HTTP, HTTPS, etc. Due to its protocol neutrality, JAIN Presence will be deployed in the existing and future wire-line, wireless, Internet, and broadband networks.

Thursday, May 16, 2002

I'm pleased to announce that I've posted the JDOM Quick Reference, Appendix B of Processing XML with Java on Cafe con Leche. This appendix contains complete signatures and summaries for all the public classes and interfaces in JDOM. Indeed in a few cases these are more complete than what's in the JDOM JavaDoc.

As usual, I'd much appreciate hearing any comments, criticisms, or corrections you have for this appendix. I'm particularly interested in three issues:

  1. Should this appendix be combined with Appendix A, JAXP Quick Reference? My original plan separated SAX, DOM, JDOM, TrAX, and JAXP factories into separate appendixes which I suppose is also still an option) but I eventually decided to pull the JAXP APIs into one chapter. That leaves JDOM hanging a bit since it's not a component of JAXP. I could just make one bigger appendix that covered them all, which would have the benefit of more parallel structure in the heading levels, and putting the JDOM QuickRef onto a single page for the online version.

  2. Have I accidentally included any deprecated methods? I tried to get them all out, but I may have missed one or two.

  3. Have I forgotten any important exceptions any of the methods might throw? The checked exceptions should all be there, but a lot of them are runtime exceptions and I could have missed these. In a few cases, it's a judgement call. For instance, should the JDOMFactory interface methods declare the same exceptions as the DefaultJDOMFactory class does. (In this case, I deliberately decided not to include them because that's an implementation detail.) This one's particularly important because I plan to go through the Javadoc for the JDOM classes and patch up the @throws clauses based on what I discovered here, so this can have an impact beyond just this book.

Please take a look and let me know what you think. I'm almost done and time is getting short, so if they're any other thoughts on any parts of the book you've been procrastinating about, now is the time to send them. Your comments have been extremely helpful up till now, and are always much appreciated. Thanks!

Wednesday, May 15, 2002

The JDistro Project is attempting to build a Java distribution (in the Linux sense of the word). The main subprojects are Wharf, the application launcher, and Korte, a desktop with document management and access to remote applications. Version 0.2.1 adds support for MIME media types, a better file renderer, actions (open, view, print), URL icons on desktop, and a URL content cache. JDistro is published under the GPL.


Smyle (Storage that Makes Your Life Easier) 0.8.1 is an open source hierachical/relational database written in and for Java. This release adds a Swing-based database browser, support for databases on read-only media (e.g., CD-ROM), support for recursive type definitions and the ability to perform more flexible schema evolution. SMYLE is published under the LGPL.


David Walend's open source Cricket Cage "automatically creates JUnit TestCases for repeatable bugs and test scenarios. Extend the GeneratesCode aspect, include Cricket Cage's AspectJ code in your compilation to install the code generator, then run the program to generate the TestCase. Finally, add the test case to your build.xml to repeat the test on every build."


Refactorit 0.9   can read Java source code and rewrite it by means of automated refactorings such as Rename Field/Method/Variable/Class/Package, Extract Method or Move Type. In addition, Refactorit provides a comprehensive set of smart query functions that make it possible to analyze and track large volumes of code. Refactorit may be used as standalone tool or installed as an add-in to IDEs like NetBeans, Forte, JDeveloper, and JBuilder. The beta is free as in beer.


Bouvard & Pécuchet 1.3.1 is an open source Java code documentation tool based on a Javadoc doclet (Bouvard) and a Swing browser application (Pécuchet). Bouvard generates XML and binary data that Pécuchet displays as indices, graphs, and HTML. 1.3.1 adds info about which methods override a method and support for the assert keyword in Java 1.4. Bouvard & Pécuchet is published under the GPL. Java 1.3 or later is required.


Simone Bordet's Foxtrot 1.2 is an API for using threads with the Java Foundation Classes/Swing) based on the "Synchronous Model" Java 1.3 or later is required.

Tuesday, May 14, 2002

I'm pleased to announce that I've posted the JAXP Quick Reference, Appendix A of Processing XML with Java on Cafe con Leche. This appendix contains complete signatures and summaries for all the public classes and interfaces in the various APIs that make up JAXP including:

As always your comments are appreciated. The end is in sight. Just one more appendix and a preface to go. With a little luck I may finish the first draft this week.

Monday, May 13, 2002

The Apache Jakarta Project has posted the third beta of Tomcat 4.0.4, the open source servlet container and Java Server Page engine for Apache.


Almost a dozen expert groups in the Java Community Process recently released the final drafts of their specifications. These are all specs that have now been rolled into the JDK as of Java 1.4. These include:

Sunday, May 12, 2002

Christopher Clemens Lee has released JavaNCSS 18.38, a GPL'd source measurement suite for Java. It can tell you how many "Non Commenting Source Statements" (NCSS) there are in your code as well as calculating the "Cyclomatic Complexity Number (McCabe metric)". This release fixes a couple of bugs.


Saturday, May 11, 2002

Nathan Fiedler's JSwat 2.3 is 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.3 adds breakpoints on thread start and death, class prepare and unload, and field access, modify, and display. It also adds regular expression in the view search as well as various bug fixes. JSwat is published under the GPL.


Oliver Burn's checkstyle 2.2 automates the process of checking Java code for conformance to various coding conventions. By default it supports the Sun Code Conventions. However, Checkstyle is highly configurable and can check for, at user option:

checkstyle is published under the LGPL.


dnsjava 1.2.4 is an implementation of the Domain Name System protocol in Java that rpvides functionality "above and beyond that of the InetAddress class." dnsjava supports all of the common record types and the DNSSEC types. It can be used for queries, zone transfers, and dynamic updates. It supports TSIG authenticated messages, partial DNSSEC verification, and EDNS0. The low level functions allow direct manipulation of dns messages and records, as well as allowing additional resolver properties to be set. A 'dig' clone, dynamic update program, and basic primary server are also included. dnsjava is published under the LGPL.


AOPSYS has posted Java Aspect Components 0.7,  a LGPL'd "Java framework that provides some facilities to achieve Aspect-Oriented Programming and to separate concerns when programming (distributed) applications (for instance, the persistence or authentication aspects can be considered independently from what the application is doing). It provides a runtime execution environment that supports Aspect-Oriented applications written with the JAC framework that provides visualisation, administration, and configuration tools for the applications and for their aspects."


Gerald Bauer's posted the first beta of Rachel 2.0, an open source resource loading toolkit for Java Web Start/Java Network Launching Protocol (JNLP). Rachel includes a protocol handler for class:// URLs that delivers content from JAR archives. It can also embed a multi-threaded Web server in an application that serves up content from JARs in the Java Web Start application cache. Rachel is published under the GPL.

Friday, May 10, 2002

The Apache Jakarta Project has released log4j 1.2, a logging package for Java that allows developers to enable logging at runtime without modifying the application binary. Version 1.2 adds Java Management Extensions (JMX) support, mapped diagnostic contexts, JDBC logging, a graphical log viewer, and buffered I/O. The Logger class replaces the Category and the Level class replaces the Priority class "to facilitate migration from the JDK 1.4 logging API to log4j." Aside from the removal of previously deprecated methods, 1.2 should be mostly backwards compatible with 1.1.3.


Jason Hunter's released a new version of his com.oreilly.servlet utility package with several improvements to file uploading including:


JDebugTool 1.3 is a $99 payware standalone Java debugger built on top of the Java Platform Debugger Architecture. It has a graphical Swing GUI, and integrated Java Help. A 30-day demo is available.

Thursday, May 9, 2002

Sun's posted a beta of the Java 2 Micro Edition (J2ME) Wireless Toolkit 1.0.4 on the Java Developer Connection (registration required). Java 1.3 or later on Solaris, Linux, or Windows is required.


Frederic Lavigne posted version 1.2.1 of his Skin Look And Feel for Java SkinLF allows Java developers to use Skins (GTK and KDE themes) in their Swing applications. Java 2 is required.


DoctorJ 3.2.3 is an LGPL'd set of applications that analyze Java code. Doc comments are checked against the actual code. Statistics for a file or project are generated, including the number of lines of code per class and method, and the overall total. A lint like syntax checker is under development.


Jaim 0.1 is a GPL'd Java library that implements the AOL TOC Instant Messaging protocol to simplify the creation of AIM bots.


jDictionary 1.4 is an open souurce GUI dictionary application written in Java. It includes a plug-in architecture that can "download and install plugins automagically from the Web. Apart from dictionary-related plugins, these can include speech synthesizer plugins which can be invoked by other plugins to pronounce words." jDictionary is published under the LGPL.


JavaLayer 0.2.0 is an open source MP3 decoder/player/converter library for Java. JavaLayerME 0.1.1 is the J2ME-oriented version of the JavaLayer project. It only supports MPEG 1 Layer 3 (i.e. MP3), and it runs under J2SE.


Brian H. Trammell's Mars 2.0.0 is a GPL'd network status monitor written in Java. It monitors a network by simulating client connections to Internet services and reporting when those services are not responding as expected.

Wednesday, May 8, 2002

I am very pleased to announce that I have posted The JDOM Model, Chapter 15 of Processing XML with Java and most importantly the last chapter in the book. There's still a preface and a couple of appendixes to be written, but at this point the main body of the book is complete. This is now a complete introduction to writing Java programs that read, manipulate, search, query, and output XML documents. I think this book is more up-to-date and more complete on these matters than any other book on the market. It covers DOM, SAX, JDOM, TrAX, JAXP, and a lot more. The actual paper version should be out in a couple of months

The latest chapter focuses on the core node classes in the org.jdom package: Element, Attribute, Text, etc. It discusses the methods of each one in detail and shows you how to use it. It introduces filters and many other techniques for navigation. And as with all the chapters, it points out the rough spots where JDOM can burn you if you aren't careful. This chapter's far and away the most up-to-date coverage of the very latest JDOM version you can get anywhere. It is essential reading for anyone who's using or considering using JDOM.

Tuesday, May 7, 2002

I opened up my e-mail last night to find a huge number of messages from various automated anti-virus scanners complaining about an infected message I allegedly sent to the xml-interest mailing list, which was a bit of a surprise since I generally practice safe computing (that is, I avoid Outlook like the plague, which is, now that I think about it, a very appropriate cliche.)

On further investigation, I tend to doubt that I actually sent the message. Instead it seems to be the result of the W32.Klez worm infecting the system of somebody who is careless enough to have Outlook installed on their system. Apparently, this worm randomly chooses a From address from the e-mail addresses it finds on the local system and uses that, rather than using the infected host's actual address. On this occasion, it happened to choose me. I suspect inspection of the actual headers of the original message would reveal the true culprit.

To compound matters, the worm sent the message to a mailing-list that doesn't require subscription in order to post so the message got forwarded to 2,125 subscribers, some of whom were running filters that blocked the message (good) and automatically notified me about the virus-laden e-mail I didn't actually send them (bad).

What can be done to stop this in the future? I can think of a few things:

Here are a few e-mail programs that are better than Microsoft Outlook:

Bruce Eckel wrote in to recommend Calypso, which you can download from WebAttack's free e-mail clients page. This also lists numerous other free-beer e-mail programs you can replace Outlook with.

Monday, May 6, 2002

Once again I'm chairing the XML track at Software Development 2002 East in Boston this November 18-22. The call for papers is now live. Tracks include .NET Programming, C++, Java Programming, Project Management, Requirements & Analysis, Scripting Languages, Web Services, Wireless, and XML, though I'm only personally invoked with the XML track. Session types include 90 minute classes, full and half-day tutorials, panels, roundtables, brown bag case studies, birds-of-a-feather gatherings and keynotes. The deadline for submitting abstracts is this Friday, May 10, 2002.

For the XML track, I try to select a broad range of tutorial-focused sessions that cover specific technologies. For example, Intro to Schemas, Intro to XSLT, Overview of XML Security, DOM for Java programmers, etc. The key idea is that the session should be a 90-minute to full-day introduction and how-to session about some specific XML technology that's reasonably well-cooked and can be used today. We find that our audience likes very practical sessions and is not as receptive to bleeding edge technologies (e.g. DOM Level 3, XSLT2) and advanced, research level presentations (e.g. Designing RDF Metadata, Optimization Schemes for XSLT, SOAP vs. REST). Our audience tends to be Java and C++ professionals who are using some XML rather than fulltime XML hackers. For the XML track, we are especially interested in 90-minute and half-day sessions. If you have any questions, feel free to e-mail me.

Sunday, May 5, 2002

Patrick C. Beard's posted the second Final Candidate Build of the MacOS X Java plugin for Mozilla.


Christopher Clemens Lee has released JavaNCSS 17.37, a GPL'd source measurement suite for Java. It can tell you how many "Non Commenting Source Statements" (NCSS) there are in your code as well as calculating the "Cyclomatic Complexity Number (McCabe metric)". This release adds Javadocs metric on a package level, an example XSLT stylesheet that converts the XML output to ASCII, and fixes a couple of bugs.


Saturday, May 4, 2002

From the "This is too creepy to be believed" department, comes the news that scientists at the Sanjiv Talwar at the SUNY Downstate Medical Center in Brooklyn and Drexel University, funded by the U.S. military, are experimenting with remote-controlled rats. Electrodes are implanted direcly into the rats's brains. Two electrodes lead to the parts of the rats' brains which normally detect an obstacle against their whiskers. A third leads to the rats' pleasure center to reward the rats for turning on cue.


Version 34.120 of the open source Jacob is now available. Jacob, the Java Commando Base, is a Java browser and project manager for Emacs. This version fixes a few bugs.

Friday, May 3, 2002

Victor Stanescu's Java Multicast Chat 0.97.4 is serverless chat software that communicates with its neighbours using IP multicast.


The Jakarta Apache Project has posted the first beta of Ant 1.5, the popular open source build tool for Java. Version 1.5 improves support for JDK 1.4 and adds support for Netware. Ant 1.5 can create bzip2 archives and MD5 checksums via built-in tasks, prompt for user input, and replace text based on regular expressions. There are lots of other bug fixes and small improvements.


XNap 2.1-pre2 is an open source Java file sharing client that supports OpenFT support via giFT. It can fetch a server list from Napigator, connecting to multiple OpenNap servers, perform multiple concurrent searches, and automatic downloads.

Thursday, May 2, 2002

Sun's released the ECperf Benchmark 1.1 specification in PDF and PostScript formats. "ECperf is an EJB performance workload that is real-world, scalable and captures the essence of why component models exist."


IBM's submitted Java Specification Request (JSR) 183, Web Services Message Security APIs, to the Java Community Process (JCP). According to the JSR,

The goal of this JSR is to enable applications to construct secure SOAP message exchanges.

This specification is intended to provide a flexible set of mechanisms that can be used to construct a range of security protocols; in other words this JSR intentionally does not describe explicit fixed security protocols.


IBM's posted the public review draft of JSR-109 Implementing Enterprise Web Services to the JCP. According to the introduction, "This specification defines the Web Services for J2EE architecture. This is a service architecture which leverages the J2EE component architecture to provide a decoupled client and server programming model which is portable across application servers, provides a scalable secure environment, and yet is familiar to J2EE developers." Comments are due by June 23.


NASA's posted the proposed final draft of JSR-38 Application Installation API Specification to the Java Community Process in PDF format. This describes "a set of interfaces and classes that support the cross-platform and robust installation of software."


The Apache Jakarta Projects has released Commons Collections 2.0, an open source library that extends and augments the Java Collections Framework. It includes:

Version 2.0 adds 11 new collections and 3 new comparators, as well as several enhancements and bug fixes.

Wednesday, May 1, 2002

Sun's submitted Java Specification Request (JSR) 185, Java Technology for the Wireless Industry, to the Java Community Process (JCP). To quote from the JSR,

In the past two years a number of JSRs that apply to the wireless communications industry have been initiated. A primary focus has been on the use of J2ME technologies in the wireless handset: MIDP (JSR-37), MIDP 2.0 (JSR-118), Wireless Messaging API (JSR-120). In addition, a number of complementary efforts are currently underway: Mobile Media API (JSR-135).

J2ME technologies have been very successful in the wireless industry. The MID Profile is incorporated into a wide variety of products. Not only are handset vendors supporting it, but implementations for PDAs are available, and implementations for other devices are certain to follow. What is not clear, and is not within the scope of any existing JSR, is how the various technologies associated with the MID Profile work together to form a complete handset solution for the wireless services industry.

What is needed is a clear exposition of an overall architecture, which would include:

  • Which optional packages fit with which profiles
  • How an end-to-end solution for interoperable Java applications could work
  • How the migration of applications can occur and to which profiles as the devices become more capable.

In addition, it would be beneficial if coordination of new JSRs and recommendations for new optional packages could take place within the context of the wireless development community as a whole.

This JSR expert group (EG) will provide an overall architectural description of a wireless client software stack. An integrated reference implementation (RI) and technology compatibility kit (TCK) bundle will be provided for the described technologies. In addition, this EG will provide advice to the JCP ME Executive Committee and other relevant bodies on the industry and associated technology.

Comments are due by May 13.


The Apache Jakarta Project has posted the first beta of JXPath 1.0, an open source XPath interpreter for Java. JXPath applies XPath expressions to graphs of objects of all kinds: JavaBeans, collections, arrays, maps, servlet contexts, DOMs, and mixtures thereof.



Older news:

20022001200019991998
JanuaryJanuary, 2002January, 2001January, 2000January, 1999January, 1998
FebruaryFebruary, 2002February, 2001February, 2000February, 1999February, 1998
MarchMarch, 2002March, 2001March, 2000March, 1999March, 1998
April April, 2002April, 2001April, 2000April, 1999April, 1998
MayMay, 2002May, 2001May, 2000May, 1999May, 1998
June June, 2002June, 2001June, 2000June, 1999June, 1998
July July, 2002July, 2001July, 2000July, 1999July, 1998
August August, 2002August, 2001August, 2000August, 1999August, 1998
September September, 2002September, 2001September, 2000September, 1999September, 1998
October October, 2002October, 2001October, 2000October, 1999October, 1998
November November, 2002November, 2001November, 2000November, 1999November, 1998
December December, 2002December, 2001December, 2000December, 1999December, 1998

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

Copyright 2002 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified May 10, 2002