Friend or Foe
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.
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 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."
cjplummerhas 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."
osbaldhas 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 java.net
News Headlines :
Registered users can submit news items for the
href="http://today.java.net/today/news/">java.net News Page using our
form. All submissions go through an editorial review before being
posted to the site. You can also subscribe to the href="http://today.java.net/pub/q/news_rss?x-ver=1.0">java.net News RSS
Current and upcoming Java
- December 7-10 - The Spring Experience 2006
- December 11-14 - Enterprise Java Architecture Workshop - San Diego
- DecemberÂ 11-15 - JavaPolis 2006
- DecemberÂ 12-15 - J2EE Training Philippines
Registered users can submit event listings for the
href="http://www.java.net/events">java.net Events Page using our
href="http://today.java.net/cs/user/create/e">events submission form.
All submissions go through an editorial review before being posted to the
Archives and Subscriptions: This blog is delivered weekdays as
Today RSS feed. Also, once this page is no longer featured as the
front page of java.net it will be
archived along with other past issues in the href="http://today.java.net/today/archive/">java.net Archive.
Is your code behaving? Are you sure?