Welcome!


How fast should our Java code be to be considered fast? After all, speed is a relative concept. I'll compare the results of CPU performance for the following JVMs: Sun's J2SE 1.4.1, 1.4.0, 1.3.1, and Jikes. These results can be used to make a number of educated decisions such as choosi...
Prentice Hall PTR has announced the publication of leading Java expert Bruce Eckel's Thinking in Java, Fourth Edition. This best-selling title has earned raves from programmers and students worldwide for its extraordinary clarity, careful organization, and small, direct programming exa...
Sun Microsystems has announced the Beta release for the Java Platform, Standard Edition 6 (Java SE 6). Code-named Project Mustang, this release is the culmination of an industry-wide design effort, open review and unprecedented collaboration between Sun engineers and hundreds of devel...
If you're a Java developer like me you ask two questions about every major J2SE release. What's new, and what's faster (or slower). Tiger includes a large number of well-publicized, high-profile features like generics, annotations, or the full new API for concurrent programming.
To enumerate means to itemize or to list. In the world of programming, enumerations, enums for short, are used to represent a finite set of values (constants) that a variable can attain. In other words, it defines the domain of a type. For instance, different states of a fan switch - o...
These days Calvin Austin is one of the busiest people in the Java world: J2SE 5.0, that was also known as the 'Tiger' project, is being officially released today! JDJ's Yakov Fain was able to catch Austin, spec lead for Java 5.0, right before the plane from San Francisco to New York wh...
A major event is about to happen - the final release of version 1.5 of the core Java platform. The changes in 1.5 are some of the most important to the Java language. This is a big step for Java and it's not an easy one. People with an existing investment in the platform tend to be ver...
Sun has announced the availability for download by developers of the latest beta of J2SE 1.5.
The beta release of the Java 2 Platform, Standard Edition (J2SE) 1.5, started gaining momentum in the developer community due to its potential improvements to the language and its convincing feature set. J2SE 1.5, code named 'Tiger,' is being developed under the Java Community Process ...
I may not believe in the existence of someone who can span the globe in a number of hours, along with a collection of antler-based creatures (one with a red nose, the others not). However, it doesn't stop me from making a list of stuff that I want for Christmas. Apologies in advance if...
Internet Relay Chat (IRC) is a system that allows groups of people to collaborate and chat from anywhere in the world. Clearly defined by several RFC documents, it's arguably the most standard real-time chat system currently in use.
Having ridden the storm of the dot-com decline, it's nice to see the worldwide press having a semi-upbeat tone about the tech economy. Java, as a language, rode the crest of the wave; it could do no wrong and Java developers were the geeks among geeks.
Have you heard? Generics will be in the next release of the Java SDK (code named Tiger, aka JDK 1.5). You might be wondering 'What is a generic?' or 'Why should I care?' or even 'Cool! How do I use them?'
The Java Sound API, first introduced in J2SE 1.3, includes the package javax.sound.midi, which contains everything you need to be able to send and receive messages to and from any MIDI device visible to your operating system.
In the 1990s, I worked extensively with the Winsock 2 interface and encryption when it first came out from Microsoft in Beta form; it was exciting in those days of networking because it allowed you to easily encrypt data through the networks.
Part 1 of this series appeared in the August issue of Java Developer's Journal (Vol. 8, issue 8), and Part 2 appeared in the September issue (Vol. 8, issue 9).
You have a task that your Ant build process needs to perform and none of the built-in or dozens of optional tasks fits the bill. If at this point you're thinking that Ant won't work for you, then the authors of Ant have some wonderful news. The framework they use to run built-in ta...
I recently had a hankering to play an older (not ancient) PC game that I used to enjoy. Since I've moved my entire desktop over to Linux (for almost a year ago now) that meant stealing my wife's Windows laptop and trying to install the game on that.
In early 2002 Intel became the first chip manufacturer to release a processor incorporating a new technology known as Simultaneous Multithreading, or SMT. Intel's SMT implementation (dubbed Hyper-Threading or HT) has been available in their Xeon processor line for over a year, with lit...
I'm sure we've all heard it before: Java on the client is slow; Swing is slow. The reality is that Sun has made great progress in increasing the speed of Swing and Java on the client.
Many engineers complain that the non-deterministic behavior of the garbage collector prevents them from utilizing the Java environment for mission-critical applications, especially distributed message-driven displays (GUIs) where user responsiveness is critical.
The first part of this article (JDJ, Vol. 8, issue 4) introduced the Standard Widget Toolkit (SWT), and showed how graphical user interfaces can be created using some of the basic widgets found in SWT. In addition, layout classes were described that allow widgets to be arbitrarily posi...
The Standard Widget Toolkit (SWT) is a Java class library that allows you to create native user interfaces. It's designed to provide efficient, portable access to the underlying facilities of the operating system on which it's implemented. SWT uses native widgets wherever possible, giv...
Do you consider yourself a Java expert? Think you know everything about exception handling? Can you quickly spot the six exception handling problems below? Every Java developer should be able to spot at least two. If you can't spot all six, read on.
It's a situation nearly every Java developer faces - Murphy's Law strikes at the most inconvenient moment: a critical application upon which everything depends suffers from an elusive heap memory leak and begins throwing OutOfMemoryErrors.
Java 3D is not a newcomer to the Java API world; however, it has suffered from slow acceptance due to the general resistance to client-side Java. Now that machines are faster, hardware 3D accelerators are a dime a dozen, and newer JVMs rival native code, client-side Java and 3D graphic...
Java on OS X is a first class citizen. You can integrate your app so well that users probably won't even know they're using a Java application. You can package your apps so they have one of those lovely 128x128 icons. You can package your apps so they have one of those lovely 1...
It's been over two years since I wrote my last article about using the Java runtime on Linux ('Java Technology on the Linux Platform' [JDJ, Vol. 5, issue 12]). The Java platform and Linux distributions have not stood still during that time, so I'm taking this opportunity to answer some...
This article details the implementation of a tool called the Command Processor. This tool takes a Java object and creates a command-line interface to its public methods.
The task of a layout manager is to position and size each component based on the size of its container. Each component has a preferred size that can be used to determine the real estate it wishes to occupy, as well as a minimum and maximum size.
There are several textbooks and Internet articles that dwell on the performance and scalability benefits of using a thread pool versus creating new threads in a multithreaded Java application.
There are many facets to consider when implementing even the most basic software configuration management (SCM). For Java, with its import mechanism, these simple goals often become unmanageable when the source code tree grows beyond a certain point of complexity.
Java development on OS X is similar to Java development on any platform, particularly any Unix platform. The differences are in how your code integrates with the platform. Java lacks a cohesive platform integration strategy, so running a Java application usually doesn't have the same f...
The most frustrating and error-prone aspect of Java for the average user is starting a Java program. The monumental confusion of batch files, scripts, and command-line cut-and-paste that's necessary to start a Java program using the default launcher is an ongoing problem area even for ...
The Austin Java User Group recently sponsored a contest to create the smallest Java Hello World! program. The rules were simple: create the smallest Java class that when executed will display the text 'Hello World!' (and only that text) to the console.
Not long ago I went with a couple of friends to a bar in lower Manhattan. While we were sipping Coronas, Jerry, our system architect friend, told us he had just inherited a high-profile J2EE system, along with one of the top Java teams in his company. 'Now we know who's buying the beer...
Although we try to make our applications pure Java, outside forces sometimes make this impossible. We had such a case recently in our shop when we had to interface to an external device with an API that supported C language calls. This is a typical case for the Java Native Inte...
Java classes should be designed to enhance their reusability and flexibility. Coding to an object type rather than an implementation by using interfaces or abstract classes can help us achieve both flexibility and reusability.
Computers can perform many operations a lot faster than humans. However, there are many tasks in which the computer falls considerably short. One such task is the interpretation of graphic information. A preschool child can easily tell the difference between a cat and a dog, but this s...
Testing is usually an afterthought in the development process. The developer's main focus is to design and write code. Of course, the developer runs the program many times during development to make sure the code runs and produces the expected results; however, this testing has no real...