Skip to main content

Friend or Foe

Posted by editor on December 7, 2006 at 8:50 AM PST

Is your code behaving? Are you sure?

How much are you using annotations? It's hard to think of a case where this Java 5.0 feature has been more enthusiastically embraced than Junit 4. A lot of the old habits -- what you import, what you name your tests, how you associate and run them -- are all out the window in favor of an annotations-based approach.

But that's just scratching the surface. JUnit's embrace of annotations allows for simple expressions like "this test times out after 5000 milliseconds", things that weren't straightforward, or even practical, in earlier versions.

Ralf Stuckert has a tour of the new version in today's Feature Article.
JUnit Reloaded explains why it's time to take up JUnit 4:

When the first release candidate was available back in 2005, you could hardly use it in a productive working environment due to the lack of tool support at that time. By now, most build-tools and IDEs come with support for JUnit 4, so it's about time to give it a try. This article describes what's different compared to JUnit 3.8.x.

Have a look, see what's new, and see if it's something that you're ready to switch to, if you already haven't... or if it's worth switching back from TestNG for.

In Java Today,
the jMaki project has released its first 1.0 beta. jMaki is an Ajax framework that provides a lightweight model for creating JavaScript centric Ajax-enabled web applications using Java, PHP, and Phobos. As Greg Murray points out in his jMaki Beta 1.0 is Out! blog, "jMaki provides also provides a large set of sample JavaScript wrappers for common services and toolkits including Dojo, Flickr, Google, Mochikit, Spry, and Yahoo. Here is what jMaki provides:" He also has a handy list of jMaki's major features.

The NetBeans community is proud to announce the first full releases of the NetBeans Visual Web Pack and the NetBeans C/C++ Development Pack. The NetBeans Visual Web Pack, allows you to rapidly and visually build standards-based web applications, including support for AJAX and JSF components. Meanwhile, the NetBeans C/C++ Development Pack provides support for a variety of C/C++ project types, and includes a makefile wizard. It also has sophisticated language model features, such as dynamic syntax highlighting, code completion, code folding and a class browser.

So how is the GPL release of Sun's Java SE and ME implementations going over? GPL Java: An interview with lead Kaffe developer Dalibor Topic, predicts a flurry of interest: "I think Free Software developers will embrace the JDK as a strong Free Software platform. The wealth of Free Software commons available on the Java platform shows that many Free Software developers have enjoyed working with the platform despite the drawback of having to rely on non-free software until suitable Free Software implementations around GNU Classpath became viable. Now that Java is being liberated, I'd expect it to be used by even more Free Software developers than before, as 'the Java Trap' is a thing of the past." Dalibor also talks about the effects on Kaffe, his experiences compiling the HotSpot and javac code, and more.

The fallout from the apparent collapse of SavaJe is underway in today's Weblogs, as John O'Conner points out
writes in SavaJe CDC "Device of Show" is a No-Show:
"Device of show? They're really a no-show. Like the mythical Phoenix bird, they may spring back to life someday if they can get more funding...but I'm not going to invest any more time in what looks like a turkey to me."

Lorenzo Puccetti wonders about language appropriateness in
Can XML capture the Dependency Injection pattern?
"A short entry in defense of the Spring XML configuration metadata to create a fully configured system or application."

Stuart Marks answers a question about
Doing Cleanup in Public "In a response to my previous blog entry, JB asked whether we could have opened up the source code and then cleaned it up after the fact, in public. The question was about OpenJDK but it applies equally well to phoneME."

In today's Forums,
dutchiedave is unconvinced that a modular JDK is such a good idea, writing in

Re: Isolation API in JDK7? that
"I guess I don't really see where the advantages of the Java Kernel are and I can see significant diadvantages. It seems the only advantage is a smaller initial download for the JRE at the expense of waiting and downloading missing pieces when running a new Java applet/webstart/application. I suppose it comes down to whether you would rather wait a determined amount of time once or whether you would rather wait less time intitially and then some undetermined time at run time. With Java pre-installed on most computers and with auto-update for Java downloading new versions of Java at convenient times I know which i prefer but i appreciate other people have different preferences."

cjplummer has some advice about device compatibility in
Re: CDC and Nokia 770:
"We haven't yet tried running phoneME Advanced on the Nokia 770 yet. We'd like to, but the phones are hard to come by. What I can tell you is that based on your description, the phoneME Advanced mr1 release should build and run on the Nokia 770. We have run phoneME Advanced on the the ARM926EJ-S. I don't see why the ARM926TEJ core would introduce new problems. Linux/ARM porting issues are usually the result of running on Linux Distros or building with gcc toolchains we haven't tried out before, not as a result of ARM core implementations. The bug mentioned in the very first posting in this forum is an example."

osbald has a tip on migrating your GUI layout to GroupLayout in
Re: Matisse GroupLayout and automatic generation of gaps?
"Also found it tricky to find where to switch Matisse over to use the GroupLayout backport library for Java 5.0 (swing-layout). You need to select the form (root) in the Inspector in the lower right-hand side of Netbeans and look at it's properties (over on the right once selected or right-click)."

In today's
News Headlines

Registered users can submit news items for the href=""> News Page using our
news submission
. All submissions go through an editorial review before being
posted to the site. You can also subscribe to the href=""> News RSS

Current and upcoming Java

Registered users can submit event listings for the href=""> Events Page using our href="">events submission form.
All submissions go through an editorial review before being posted to the

Archives and Subscriptions: This blog is delivered weekdays as
the Java
Today RSS feed
. Also, once this page is no longer featured as the
front page of it will be
archived along with other past issues in the href=""> Archive.

Is your code behaving? Are you sure?