Examine the roots of the double-checked locking idiom, why it was developed, and why it doesn't work. The Java programming language contains several useful programming idioms. It also contains some that further study has shown should not be used. Double-checked locking is one such idiom that should never be used.
Ant, from Jakarta project at the Apache Foundation, has become a de facto standard for building Java projects. You may already be using it to create automatic builds. It's easy enough to tailor those builds to your needs by customizing the build files; but what if you want to wait until run time to set certain properties? This article shows you how to extend Ant to produce builds that are interactive at run time; users can follow prompts to change parameters each time they conduct a build without having to deal with unfamiliar build files. You can incorporate this functionality into your builds to provide a smoother and more flexible experience for your end users.
The Java 2 Platform, Micro Edition (J2ME) offers great tools for developers, porting the Java platform's network-centric and platform-agnostic worldview down to memory- and processor-limited devices. This article explains the basics of the J2ME world, showing you the building blocks of the platform and demonstrating a sample application.
Java 2D may be the most obvious solution for programming 2D graphs in Java programs, but it's not the only one. This article proposes an elegant alternative in the form of Java Objects for Science (JSci), an open-source package that lets you create 2D bar graphs, pie charts, and line graphs in Swing.
One of the strengths of the Java platform is its object-oriented nature; one of the benefits of object-oriented languages is that they aid code reuse. But what if you're a Java programmer and you want to reuse code that wasn't written in the Java language? With Bridge2Java, an IBM alphaWorks technology, Java developers can integrate COM objects into their applications. This article explains how it works.
Project Jxta is a community-run attempt to build a utility application substrate for peer-to-peer applications. The initial reference implementation of Jxta includes a command-line shell that allows experimentation with the core Jxta platform without programming. This article takes us through a hands-on tour of the a href="http://www-106.ibm.com/developerworks/java/library/j-p2pint2?open&l=766,t=grj,p=Jxta2"Jxta shell/a. You'll explore its command set and extend its capability by writing your own custom commands using the Java programming language.
Graphical and user interface capabilities have progressed in leaps and bounds since the early days of the Java language. The Java 2 platform contains a sophisticated cross-platform user interface architecture that consists of numerous high-level components, an advanced feature-rich device-independent graphics system, and a host of multimedia extensions. This article explores this progression, examines the capabilities of the current version 1.3 in detail, and looks to the future to see what release 1.4 will offer.
Neural nets may be the future of computing. A good way to understand them is with a puzzle that neural nets can be used to solve. Suppose that you are given 500 characters of code that you know to be C, C++, Java, or Python. Now, construct a program that identifies the code's language. One solution is to construct a neural net that learns to identify these languages. This article discusses the basic features of neural nets and approaches to constructing them so you can apply them in your own coding.
This article shows you how to combine and leverage the best parts of Jiro technology and the Web-Based Enterprise Management (WBEM) initiative. Using familiar examples from the previous two articles of this column, this article introduces the WBEM client technologies for accessing and manipulating data in a CIMOM. It then shows you how to access the same data more elegantly and efficiently, by rearchitecting the Jiro management facade to act as the interface to the CIMOM. Finally, he talks about the need for greater standardization of Jiro management facades and discusses the future of management application programming under a combined Jiro and WBEM development platform.
In the real world of everyday computing (and development), there are many situations where "whipping up a Java program" to perform a task is either impractical or too time consuming. This article takes you into the underground world of FESI (Free EcmaScript Interpreter), where deploying the Java language in a quick-and-dirty fashion is the norm rather than the exception. Article includes code snipets.