Skip navigation

Looking for Clues Blog

Posted by kfarnham Nov 30, 2006

Digging into your desktop's address book from your mobile device

So what's wrong with running a servlet on your desktop machine? I mean, aside from any concerns about resource consumption or security, is there something intrinsically wrong about servicing HTTP requests from something other than a dedicated server?

The idea behind today's Feature Articlebasically requires you to be running Tomcat, GlassFish, Jetty, or some equivalent servlet container on your desktop. The idea is that you can put a servlet in place to serve up some custom data to a mobile client.

When I first heard the article pitch, I imagined some more exotic, Java-ish connection, like RMI or something. But on reflection, HTTP seems like a pretty good choice - it's well-understood, well-supported by Java ME, can run on known ports, passes unmolested through firewalls, can be proxied, etc. And hey, simple is good.

So take a look at how Biswajit Sarkar proposes to Access Desktop Data from Mobile Devices in today's article. He combines a custom MIDlet on the phone and a servlet to format HTTP requests for address book queries in a simple format, does the work on the desktop, then parses the result on the phone. In a nice trick, the MIDlet client can actually dial the returned number on the handset, which should save you a few keypresses.

In the Java Today section, the Semblance project has announced the release of Semblance 1.0B1, which incorporates the StrutsLive framework (formerly maintained as a separate project) a new Foundation framework, and a comprehensive example application. This is a major feature release that adds support for XHTML templating, dynamic query generation, and list management, including pagination, navigation, sorting, filtering, and selection management. Please see the release notes for further details.

Patrick Wright has announced that the SwingLabs website now has search: "We now have search enabled for SwingLabs-related topics on the SwingLabs website. This uses a new Google feature, Google Custom Search. The results come from Google, and are restricted (in this case) to a known set of websites, including the discussion forums, project sites, and blogs, among others. We can tune the CSE settings over time to get more accurate results."

One of Europe's most popular Java conferences, JavaPolisstarts in a little over a week, running from December 11 through 15 in Antwerp, Belgium. The first two days feature "University" sessions and hands-on labs, while the last three days are stuffed with 60-minute technical talks, 15-minute "quickies", BoFs, and "whiteboard" sessions that are proposed and assembled on-site, similar to an unconference. Registrationis still open, with a €200 entrance fee.



What's It Take? Blog

Posted by kfarnham Nov 29, 2006

What do you need in JDK 7?

Last week, we noted Elliotte Rusty Harold's RatJava blog entry, which proposed making a set of syntactic language changes (eliminating semicolons, requiring braces for multi-line statements, simplifying multi-line String literals), which could be supported by hacking javac. The resulting language wouldn't be Java (and probably wouldn't be well-suited to collaboration, which is one of Java's strengths), but would emit genuine Java bytecode and would work with existing code and libraries. It's one of the first topics of discussion on this week's JavaPosse podcast, if you'd care to hear what the Posse guys think.

A similar set of ideas appeared in this week's JavaLobby newsletter, which led off with MiG InfoCom AB president Mikael Grev's Christmas Wish List for Java, collecting a number of things he'd like to see from the language, its implementors, and the community in general. Perhaps the most interesting change in the form of this wish-list is that with Java GPL'ed, the phrasing of such lists has changed from "Sun should do X" to "someone should do X", recognizing the potential for many community members (individuals, companies, organizations, etc.) to contribute to Java's evolution by hacking on the JDK code itself. So, given that it's a wish-list to anyone in a position to grant his wishes and not just Sun, his requests include a legacy-free "Swing 2.0" for JDK 7, a "for.index" that would return the index of a for-each counter, and a killer app in Java. Unsurprisingly, over a hundred of people have joined the talkbacks to his JavaLobby post, commenting on his ideas and offering some wished-for features of their own.

So what about you? What do you want to see in Java? Can you add it yourself, would you need help, or does someone else need to do it?

Also in the Java Today section, Peter von der Ahé's blog has posted a list of JDK7 b03 compiler fixes. "I'm not sure when b03 will be available for download from Since the main focus of our organization is releasing JDK 6 right now, JDK 7 is on the back burner. There is good news and bad news about the first JDK 6 update release (6u1). The good news is that 6u1 should be released very soon after JDK 6. The bad news is that the compiler is not considered critical for this release and there will be no compiler back ports to JDK 6u1."

The NetBeans 5.5 Testing Contest Information has an update for Brazilian Portuguese developers: "Thanks to great contribution by a number of developers in Brazil, NetBeans now has a Brazilian Portuguese version ready for inclusion in the official NetBeans IDE 5.5 Multilingual version. All that remains is to fully test the product to make sure it will be accepted by developers in Brazil."

Today's Forums, continue the discussion of whether JDK 7 could and should support multiple Java applications in one JVM instance. One of the current problems is pointed out by cowwoc in Re: Isolation API in JDK7?: "Actually I'd like to inject a point that might be in coxcu's favor. I once wrote an application that injected itself into a remote process space (explorer.exe to be specific) and launched a JVM inside there. The problem, you see, is that there is no way to terminate a JVM without killing the entire process it's running in (see JNI_DestroyJavaVM()). Now, by implication, any time I wanted to uninstall my application, I'd want to remove its DLLs, which by extension meant I had to shut down my code running inside explorer's process-space which by implication meant I had to kill the JVM... and it took down Explorer with it."

Joshua Marinacci posts about a Painter set refactoring on the SwingLabs forum: "I've just committed the latest (and hopefully final) refactoring of the Painter API to CVS. Here's the basic idea: JXComponent, an interface that JXPanel, JXLabel, etc will implement. Most instances of JXComponent will simply delegate to PainterSupportImpl which will do the real storage and work. The various get/setPainter/Background/Foreground methods all eventually modify something in the map that comes from getPainters(). This map is live, meaning you can get it and change the contents, and the changes will be reflected on the next paint cycle."

Finally, phenderson has a WebStart feature request: "I've an idea which could help improve WebStart on Glassfish. Instead of hard coding the application name etc in sun-application-client.xml have the web start servlet generator request information from a bean. Then the bean can provide all the relevant info for the JNLP file. The reason I would like this, is so that I can customize (via DB values) the Name of the JNLP application and therefore making the list of applications on the clients pc unique. Something like 'StarjarEnterprise (Company A)' 'StarjarEnterprise (Test)' etc. Dynamic data is much more useful than hard coded values tucked away in xml files."

Returning to the idea of the Isolation API and running many apps in one JVM, Mark


Between Us Blog

Posted by kfarnham Nov 28, 2006

When constructors need to be private

Sometimes when we get a not-so-stupid question, we need to expand the question as originally submitted, to give readers a little to chew on before they reach the discussion section. And that can be a little tricky when we already know the answer. It does require mentally placing one's self in the mind of someone who hasn't been programming in Java for a long time.

In other words, if I can forget the many times I've banged out a singleton pattern, I can take myself back to a place where the idea of a private constructor didn't make sense. To the new programmer, this can be a valid conundrum: if you would need to have an instance of some class to call a private method on that class, and would need to call a private constructor to create such an instance, it seems like a logical impossibility.

Many of you see the hole in this reasoning (I'll bet you've written a few singleton patterns in your time, yes?), because within just an hour of posting today's Feature Article, there were already four substantial talkbacks. And I'll bet there are more uses to be discussed other than just the singleton. So please have a look at (Not So) Stupid Questions 15: How Can a Constructor Be Private?and see if you can add something to the discussion.

In Java Today, the ossj-tck-foundation project has graduated fom the incubator to a Java Enterprise project. The goal of the OSSJ TCK Foundation project is to ease creation of OSS/J TCKs by ensuring that the TCK builder can focus on building test cases and not having to worry about the 'plumbing' that is needed to bridge the 3 integration profiles (EJB, XML/JMS, Webservice) that are defined for all OSS/J APIs.

To celebrate the NetBeans 5.5 launch, NetBeans has put together the second edition of NetBeans Magazine, focusing on enterprise development. This edition of NetBeans Magazine covers a wide range of new features in NetBeans 5.5 and its main extensions, while also delving into core Java technologies. You can view this issue as a whole or as individual articles.

Java Puzzlers author Neal Gafter is back again with A Thread Pool Puzzler: "When I started using java.util.concurrent I was already somewhat comfortable with [its] concepts. But when I used it more intensely for production work in the Google Calendar server, I ran into a couple of 'gotcha' situations. I'd like to tell you about one in particular, in part because it might help you avoid the problem yourself, and in part because I believe this issue exposes some missing functionality in the concurrency framework."



Every Kinda People Blog

Posted by kfarnham Nov 27, 2006

Saying "thanks" to projects you find useful

Last year, we ran a poll asking How active are you in projects? The answers got us some hackles:

  • Project owner
  • Have contributed code
  • Have filed bugs/RFE's
  • Have discussed projects in lists/forums
  • Not active in projects

Some people said we should have had a fifth response, between "have discussed projects..." and "not active", for "Have downloaded project code". I actually considered that, and chose not to make it an option, because I wanted all the active choices to involve some kind of write-level access. My thought being that if you don't even acknowledge a project by filing a bug, or posting a note on its boards, or interacting in any way with any person involved in the project, then that's not participating in the project in any meaningful way. After all, the least you can say is "thanks".

The latest JavaTools Community Newsletter makes a similar point. In the "tool tip" section of the November 22 newsletter, Daniel Lopez writes:

In many cases, behind all these things there are real world people that do something they are passionate about and give it for free to others "just because", there are probably as many motives as people, and they simply receive no monetary payment for that. The only payment they can expect is a simple "thank you" that tells them somebody actually used their software, read their tutorial, used their trick to solve a problem... and it worked for them; that the time and effort they invested to give that thing for free was worthy, because it helped someone. That's all.

So let's pay them: That's what I would love all of us to do: Choose an open source project, tool, a blog, a tutorial, a free book or something that helps you, or did so in the past, and that was provided to you for free and simply spend a minute or two to write a grateful email to the author. Just a simple "Thanks, I've used your X and it has helped me a lot" is enough, even though if you can tell them a bit more I'm sure they will love it.

For those in the US, it's a few days after Thanksgiving, but I think it still counts. Let's hear it for everyone who's posted code, helped others with problems, documented how to use something, or done anything else to help.

Also in Java Today, Alexey Popov has posted an Introduction to Java ME Testing Tools that lists some available tools, and addresses how to deal with large test suites, CDC and SE testing tools, and CLDC and MIDP testing tools. "This blog is based on and is about

What's the best way to make sense of an API?

For the earliest Java programmers, a handy copy of Java in a Nutshell was essential. Yet nowadays, the need to look up method signatures in a book has fallen by the wayside for a lot of people, as IDE's auto-complete method names and fill in parameters. Combined with Javadocs, this gives a lot of developers everything they need.

Or does it? How much information do you need to successfully use a given API? For example, Container.add (Component, Object) seems straightforward enough, but do it on a Swing root pane container (like a JFrame) and you get an exception (because you're supposed to add to the root pane, not the container itself). Even though the syntax is viable, the semantics aren't. This argues for some kind of documentation beyond just descriptions of methods, in favor of one that describes higher-level processes, and where the various method calls play into those processes.

Of course, some would say that's a design smell that indicates Swing itself is broken for having a seemingly sensible method call blow up in your face so badly. There are some who suggest that API's that aren't themselves self-documenting are inherently defective. You see this a lot from the Objective-C camp, where you have to name your parameters in every call, even when the possible parameter is obvious from its type (for example, if Obj-C had an equivalent to the Container.add() above, calling it might look like [myContainer add object: myComponent constraint: gridBagObject]. As you can see, this makes the purpose of the mysterious second argument explicit to every caller. More clarity, at the price of more keystrokes. So what do you think of that approach?

With this in mind, the latest Poll asks "What's your preferred form of API documentation?" Cast your vote on the front page, then visit the results page for current tallies and discussion.

In Java Today, the second part of the SDN's introduction to JAX-WS has been posted, continuing a tutorial on how to develop web services and their clients with Java SE 6. In Introducing JAX-WS 2.0 With the Java SE 6 Platform, Part 2, you'll see how to create a client to the eBay production server, using Java SE 6 and NetBeans.

Started a project but don't know how to use the source control repository or even what it's for? partner Collabnet has posted An Introduction to Version Control on their openCollabNet site. It offers an overview of the concepts of version control, compares the lock-modify-unlock and copy-merge approaches, and offers a basic vocabulary of important version control terminology.

The Pragmatic Problem Solving blog has posted an article on Clustering - EJBs vs JMS vs POJOs with a focus on the Java EE technologies: "Scaling out a java application traditionally has not been easy. There are a number of technologies that allow you to distribute data across multiple JVMs, but most of them are cumbersome, high maintenance and do not scale linearly. Let's discuss the pain points involved in using three different approaches namely EJBs, JMS and POJOs."



Let's Go Crazy Blog

Posted by kfarnham Nov 23, 2006

Java forks for all!

With Sun offering an Open-Source Java implementation under a GPL license, forks are inevitable and even desirable. Maybe it can't be called "Java" or use the coffee cup icon, but even still, aren't there some things that you'd like to set right, if only for yourself?

Author (and Amateurproject owner) Elliotte Rusty Harold came away from a presentation on open-source Java with a list of language changes he would like to make, even if it's only to set things right for his own development (after all, his list of changes wouldn't square with the language as defined in the Java Language Specification and ratified by the JCP). He calls it RatJava, in homage to an early 70's cleanup of Fortran called RatFor.

Take a look at his list of changes and see how many you agree with:

  • No semicolons
  • Require braces for multiline statements
  • break by default at the end of acase
  • Permit switch on types other thanint
  • Ban tabs
  • Make multi-line String literals easier to write
  • Make final the default
  • Make UTF-8 the default and only encoding

There are already a couple dozen interesting talkbacks to Elliotte's list; as Curt Cox points out while adding his wish-list, "it's easy to come up with lots of really useful Java 'skins'.

What's interesting is that you can get a lot done while still maintaining bytecode compatibility. After all, as Elliotte points out "we can finally clean up some of the little annoyances in the Java language, while still maintaining full compatibility with the Java VM and Java libraries; simply by making a few modifications tojavac."

So how about you? How would you redefine the language to suit yourself and your programming practices and preferences?

Also, in Java Today, InfoQ's JRuby brings Rails applications to Glassfish points to a blogby Naoto Takai that shows how to deploy a Rails application to GlassFish by way of JRuby. InfoQ points out that the use of GlassFish allows for "a more robust and scalable deployment platform." However ONJava blogger Robert Cooper argues that the approach sacrifices the simplicity of WAR-based deployment.

Think you know NetBeans? Try the NetBeans Community-Contributed Quiz. "Following true Open-Source style, the questions for this quiz were contributed by NetBeans Community members. All submissions with the correct answers will be entered in a drawing for four NetBeans Field Guides (2nd edition). Only one submission per participant is accepted."

Open-Source Java topics dominate today's Weblogs. John


U Got the Look Blog

Posted by kfarnham Nov 22, 2006

Extreme GUI Makeover code... at last!

Some of the JavaOne demos have gotten a bad reputation... perhaps not undeserved... of showing off neat stuff but not backing it up with code that can be inspected, analyzed, and reused. It's great that Romain Guy can make a Java app look like something out of Steve Jobs' dojo of design, but if you can I can't duplicate that with our own apps, what's the point?

After this year's JavaOne, the complaints went up that without code, these kidns of sessions were of limited value. The Aerith developers worked with the legal department (I think their mashup apparently hadn't been entirely to the letter of the various web API's terms of use?) and got the code to a point where they could actually get it released, within a month or two of the show and the inevitable post-show recovery phase.

It's taken a little longer, but finally the code from the other big GUI showoff session isnow available. In Java Today, Scott Violet has posted Extreme GUI Makeover: 2006 "Borrowing the idea from the popular TV show, the idea was to makeover an ugly ducking of a Swing app, turning it into a beautiful swan. Shannon, Romain and myself had a great time putting the app together and doing the session; as a bonus, the session was one of the most popular talks. WOW! Because we had so much fun, and because of the popularity, we decided to do a similar session for 2006." Scott's blog entry provides an overview of the mock e-mail client presented at JavaOne 2006 and finally provides its source code.

Last week Google released version 1.2 of the Google Web Toolkit (GWT), an open-source Ajax library that translates Java code into highly optimized JavaScript. In Bret Taylor on the Google Web Toolkit Artima interviews the senior product manager for Google developer tools, about Ajax development and new features in GWT.

At the JavaOne conference in May 2006, Sun Microsystems announced its intention to open source Java technology. Now, Sun plans to open source most of the Java Platform, Micro Edition (Java ME) by the end of 2006 and much of Java Platform, Standard Edition (Java SE) by early 2007. An update on the how and why of the Open-Source Java ME release can be found in the SDN interview Open Sourcing Java Platform, Micro Edition: A Conversation With Sun's Senior Director of Mobile & Embedded Platforms, Shannon Lynch.

In today's Forums, Ian Strain has some ME game development advice in the thread Re: Background Music in Games - Any Tips: "We looked into this, the only phone we got this working on was the K750, using a midi as the background and wavs for sfx. I'm sure sony ercisson phones in the same category as the K750 will be capable of this too. We tried this on all other devices available (motorola, samsung, sharp, lg, sagem) but it never worked. So, either use a background sound and forget about sfx or just have sfx. I'd go with sfx and anyway most people turn the sound off anyway."

The thread Re: When SwingX and other JDNC will be part of JDK discusses the status and management of the SwingX project. Noel Grandin writes: "I think SwingX has a lot of promise - I was really hoping it would grow into a central place where people could develop swing components for re-use, instead of having various small unmaintained components scattered around dozens of mailing lists and websites. But SwingX is not acting like a real open-source project. A real open-source project has release versions and development versions. This is important so that we generate stable, reliable components for people to program against, while we push forward with improvements."

Finally, in Re: Java EE appclients vs standalone clients,tjquinn writes: "You are absolutely correct about the restriction regarding injection support in app clients. The app client container does the injection only in the app client's main class and only on static elements. If you want to refer to an injected field from some other class you could write a public (or package-visible if you prefer and it would work for you) static getter method that returns the annotated main class's field. The injection occurs before the main class's main method is invoked, so any code invoked directly or indirectly from there that invoked the getter would get the injected value."

Mark Lam has a Introduction to phoneME Advanced VM Internals in today's Weblogs. "With JavaME open-sourced in the phoneME project, the public now has access to the code. However, in order to be able to navigate and effectively contribute to the code, one will also need knowledge of additional details like coding conventions, terminology/jargon, design philosophies, code organization, and design-tradeoff decisions for example."

Fabrizio Giudici offers a Design for exploiting parallelism: "Ok, I think I've spent enough time on preliminaries, so this time I'm gonna show you some UML diagrams and code. I also have to introduce you Emmanuele Sordini, one of my best friends and co-author of the Mistral project."

Finally, Rémi Forax digs into the latest revision of the JDK 7 closures proposal in java.lang.Unreachable as type argument: "The closure proposal specifies a new type java.lang.Undeclarable that can be used as a return type of a method to indicates that this method never returns. All instructions after a call to a method that returns Undeclarable are unreachable."

In today's News Headlines :

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

Current and upcoming Java Events :

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

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 Archive.

Extreme GUI Makeover code... at last!  

Sign O' The Times Blog

Posted by kfarnham Nov 20, 2006

A look at signing XML documents

While we were in our special Open-Source Java announcement coverage, the release candidate of Java SE 6 became available. That's one of several items I wanted to make sure to point out that happened last week but wasn't germane to the GPL Java launch (similarly, you'll notice an updated on JSR 277 on today's page, and the closures proposal for Java SE 7 on yesterday's page).

One interesting feature in Java SE 6 is that of "XML Signatures", which enables a lot of other technologies by providing something simple but important -- validation that an XML document as received by one party is identical to the document as sent by another party.

Young Yang offers an introduction to XML Signature in today's Feature Article, XML Signature with JSR-105 in Java SE 6:

XML Signature technology, specified in the W3C recommendation,XML-Signature Syntax and Processing, is at the foundation for solutions of message level-security in SOA. The universally adopted OASIS standard WS-Securityis built upon this technology (and XML encryption). JSR-105 standardizes XML Signature technology for the Java platform, and will be part of the forthcoming Java SE 6 release. This article provides an introduction to JSR-105 based on the release candidate version of SE 6.

In Java Today, the one hundred-first issue of the JavaTools Community Newsletter is online, with tool news from around the web (particularly about last week's Open-Source Java announcements), a welcome to the new JT Harness test harness project, a "Tool Tip" on using Web Start on, and announcements of new JavaTools Community projects and graduations from the community's incubator.

Do you blog about NetBeans, write apps or plugins, answer questions on mailinglists, help with localization, or are you actively involved in the NetBeans community in any other way? Then the Dream Team may be for you. The NetBeans Dream Team is a community-driven group of highly skilled NetBeans users. They participate at NetBeans developer events, on mailing lists and developer forums, providing new, interesting and informative content as well as developing new and creative ways to promote NetBeans. If you think you have the right stuff or know of a strong NetBeans advocate, then read on and submit a nomination The closing date for nominations is Friday, December 1st.

After the early draft release of JSR 277 a number of questions were raised by the Java community at large about JSR 277, JSR 294 and OSGi. Concerns included overlap with the functionality provided by OSGi, lack of inclusion of important community members on the expert group, and JSR 277 reinventing existing technology. The InfoQ interview JSR 277 & 294 leads respond to concerns over OSGi overlap and transparency discusses these items with Stanley Ho (Spec Lead of JSR 277) and Andreas Sterbenz (co-Spec Lead of JSR 294).



Delirious Blog

Posted by kfarnham Nov 20, 2006

A blog better late than never... I think

Disclosure: tomorrow we're taking the kids up north for Thanksgiving, and with most of the rest of O'Reilly filing out at various times early in the week, I decided to get all the article stuff for (and a book excerpt for ONJava) in as early as I could, so that I wouldn't get crunched tomorrow en route to the airport (which, being Atlanta, will be tough enough as it is).

Add that to a meeting, some e-mail, printing boarding passes, getting the front page up and flipped back to its normal mode from last week's special coverage of the Open-Source Java launch... and suddenly, it's 4:30 and there's no editor's blog.

Oops, sorry about that. Hopefully, you'll enjoy the thorough refresh of items on the front page. There were other things happening aside from the open-source Java announcement -- updates to the ongoing closures and modules proposals, to name two -- so there'll be lots to talk about this week, even if you're in the US and taking part of this week off.

In Java Today, Fabrizio Giudici has some tips for Setting up NetBeans-based projects with a Continuous Integration server: "Continuous Integration (CI) servers are facilities able to monitor changes in a source repository (e.g. CVS or Subversion) and schedule a new build automatically, in order to verify if the new committed code broke the stability of the system. They are installed on remote servers and usually don't run on programmers' computers - so apparently a problem arises if we're thinking of projects developed with the NetBeans IDE. As most CI products can be easily configured by just pointing them to a build.xml ant script, the problem just translates to being able to setup a working 'headless' environment for a NetBeans-based project."

Artima links to Neal Gafter's Update on the Closures Proposal that he, Gilad Bracha, James Gosling, and Peter Ahé, have been working on. "At the heart of the proposal is the ability of the compiler to convert closures to compatible interfaces. The most recent change clarifies the conversion of closures that return void. In a recent blog post, Closures Esoterica: completion transparency, Neal Gafter reports on progress in proposing closuresfor Java."

Got a hot Java technology topic for 2007? Do you have specific tips and tricks to help developers perform their jobs better, faster, or more efficiently? The JavaOne conference is the stage where you can share your Java technology expertise and knowledge of real-world solutions and best practices with a worldwide audience of developers. This is your chance to become one of next year's Rock Star speakers. Visit the Call for Papers pageto submit your session abstract. The Call for Papers deadline is December 15, 2006.

In today's WeblogsJohn

Wrapping up our special event

Today's the last day for our special look on the front page. On Monday, we'll be back to our regular mode, so we can catch up with developments in the projects and communities, and news in the Java world in general (such as new developments regarding JSR-277 and closures in Java SE 7). But we'll also be keeping a close eye on the newly GPL'ed projects that are part of the community: the OpenJDK project and Mobile & Embedded community, as well as GlassFish the already open-source Java EE implementation that will soon be adding GPL to its license options.

But there's still stuff to talk about regarding Monday's release itself. Mark Reinhold's blog goes Behind the Scenes to show what Sun had to do to pull off the open-source launch:

Rich Green's statement at JavaOne '06 that, "at this point, it is not a question of whether, but it is a question of how," was--truth be told--a bit of a surprise. Many of us here on the Java team at Sun had seen this coming for a few years, but few expected it this year.

Thoughts about dual licenses

Tim Bray talked with Artima on What GPL'ed Java Means, and one of the key points they cover in the interview is the dual-licensing model: keeping the existing commercial license for one group of customers that's comfortable with it, and add GPL:

We have lots of commercial licensees. The obvious major players, like IBM, BEA, and lots of others who take the Java code and improve it and put it in their products. In the area of Java ME, obviously a huge portion of the mobile phone industry in the world is a commercial licensee of that technology. We can't cancel those, those are contracts. It would not only be illegal to cancel them, it would be unethical to not offer to renew them when they expire.

For that reason, Java will go on being offered under the existing commercial licenses that we have offered. For those who have commercial licenses with us, when those licenses expire, they will have the option of dropping them and going with the open-source GPL'd version for free, of course. That will be their choice. I suspect that some will, and some won't. It's a complex set of trade-offs.

But do two licenses mean, effectively, two Javas? Robert Cooper fires back with some concerns in his ONJava blog Think of a number between 1 and 10...:

Here's the thing, Tim. That is all well and good, except you maintain the dual licensing model. Unless *Sun* wants to fork Java -- an all internal version, and an all GPL version -- that is just not going to happen. All those improvements that might float around on the internet can

Time to dig in and see what we can do

Oh, I know, in internet time, the GPL open-source Java release is so two days ago. Literally. Slashdot has moved on to five stories a day about problems with the PlayStation 3, which will surely come as a bummer to the kids already waiting outside Best Buy for Friday's release.

But here's the thing: now that the first bits are here -- javac, HotSpot, phoneME, etc. -- what are you going to do with them? What are you able to do with them?" There are more possibilities today than there were last week. In a new blog, Bruce Boyes celebrates the end of the "Java Trap", a term originally coined by Richard Stallman, in No more "Java Trap" as Java goes open source?, calling for unification around a solid ME implementation:

Which brings me back to Stallman's remarks about the Java Trap. What about the C and assembly code trap? It's all a big trap, or more accurately, a Tar Pit. The sooner we can unstick ourselves, the sooner we can get Real Work done. And Java still gives us the best hope of doing that. Open-sourcing Java, while a step in the right direction, is just a step. There's a lot more that needs to be done to make developers more productive.

Meanwhile, David Orme has posted some Concerns about GPL-licensed Java, one of which reads like this:

All of us who program in Java for a living refer to the JDK source code from time to time. Suppose one day, you read something from LinkedList and decide that you need a MappedList, so you copy some snippets from LinkedList into your MappedList class to create it. Congratulations, you just licensed your entire project under the GPL. Even worse, if you read some clever algorithm somewhere in the JDK source code and then rewrite it in a similar manner in your own code, your own code might be considered a derivative work of the JDK, and thus come under the GPL.

David Herron takes on these questions in his blog Re: Concerns about GPL-licensed Java, and replies to this concern by pointing out that carelessness in handling licenses and where you copy code from is not the GPL's fault, not Sun's fault, and not Java's fault. "If you're going to be sloppy about where you get your code from, and the licenses that code is under, then you deserve whatever problem that befalls you."

In other front-page commentaries, Tim Bray's Java is Free discusses the history and challenges of the choice of GPL, and acknowledges that some people argued for other options. Robert Cooper's Java GPLed wonders aloud what it will take to win over elements of the Linux crowd who may be slow to recognize that their issues have been addressed. Roger Brinkley talks about JavaHelp's Emancipation, while Danese Cooper acknowledges (and lists!) The People Who Brought You FOSS Java. Also, Red Hat has posted a few video commentaries praising the GPL release as A Great Day for Open Source.

As for digging into the projects themselves, Tom Ball discusses how to get started Hacking Open Source javac, while Stuart Marks' blog How the Leopard Got His Spots explains the terminology of "phoneME Feature" and "phoneME Advanced" used in the Mobile & Embedded community.

Days before the announcement, James Gosling shared his thoughts on open-source licensing with the SDN. In his post announcement follow-up, James Gosling on Open Sourcing Sun's Java Platform Implementations, Part 2, he discusses the impacts of the release and where Java goes from here. In another article about impacts, Artima discussesWhat Open-Source Java Means for the JCP with JCP program manager Heather Vancura.

Today's poll question is "Have you tried out GlassFish?" Cast your vote on the front page, then visit the results page for current tallies and discussion.

Finally, the Dukeproject has A Brief History of the Green Project, the handheld project that gave rise to Oak (which later became Java) and the Duke mascot.

Current and upcoming Java Events :

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

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 Archive.

Time to dig in and see what we can do  

And the fans go wild...

The plan for this week's coverage has been to pack Monday's page with the content available to us from the open-source release of Sun's Java SE and ME implementations, and then follow where the community goes for the rest of the week. Unsurprisingly, after just 24 hours, the plaudits are still rolling in.

There are a number of these items on the front page today, including video paludits from Richard Stallman (as described in a David Van Couvering blog), O'Reilly editor Mike Loukides, and Kaffe and Harmony developer Dalibor Topic. We've also got perspectives from some of the bloggers you're used to seeing on, including David Herron, Joshua Marinacci, and a little comedy from Kelly O'Hair, who has announced the open-sourcing of his dog.

We're also promting the new communities and projects that are part of the open-source Java launch. The new Mobile & Embedded community has a number of bloggers already up and running, including Stuart Marks and Terrence Barr.

Digging into the release, the Java Posse podcast has already put out an episode for the occasion, interviewing Sun's Mark Reinhold, Rich Sands and Eric Chu in Java Posse #093 - Special: Open Source Java Interview. GNU Classpath's Andrew Hughes only needed a day to get the open-source javac to compile with GNU Classpath, a process he details in Victory! Pigs Fly as Java is GPLed and Sun's javac compiles Freely.

And what about EE? As Eduardo

It's real. It's GPL. And is a big part of it.

It's a new day in the Java world. Stories are crossing wires, news embargoes are ending, and the word is out:

Sun is releasing Java SE and ME implementations under terms of the GPLv2.

We're going into a special coverage mode for this event, somewhat based on our JavaOne page design. Here, we'll collect links of interest for the November 13th announcement. Today, you'll see a lot of the initial announcements and basic information, and as the week goes on, we'll link in developments both here on and reaction from around the net.

Did you ever think this would happen? We've posted a welcome editorial, Not A Hoax, summarizing today's announcements and speaking to the involvement of the community.

But what's really up? You can start with Java creator James Gosling's thoughts on the release in his A Letter to the Java Community. Or, if you want to dig into details, check out the Open-Source Java FAQ that Sun has posted.

As today's announcements involve significant changes to the ME and SE worlds, we'd like to call your attention to two new communities on the OpenJDKproject (where you'll find HotSpot virtual machine and the javac Java programming language compiler) and the Mobile & Embedded community, a gathering place for developers working with Java Micro Edition.

Throughout the week, we'll also be featuring blogs from community leaders, project owners, and other bloggers, as well as reactions and developments from all around the web (remarkably, the Java Possehas already chimed in with a podcast). So we hope you'll check back frequently for new items of interest. To join in the discussion, we've also opened a new forum, The Big Answer, following on to The Big Question of open-sourcing Java that has been debated in the forums for years now.

Please continue to check back all week as we roll along with this exciting announcement.

Current and upcoming Java Events :

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

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 Archive.

It's real. It's GPL. And is a big part of it.  

That Voice Again Blog

Posted by kfarnham Nov 10, 2006

Lunch with 1/4 of the Java Posse

It turns out that Dick Wall of the Java Posse podcast works just 15 minutes down I-75 from me here in Atlanta, so while swapping mail about their upcoming conference, he suggested we get together for lunch sometime. We finally did so yesterday, and only as I listened to their latest show on the way down to the restaurant did I realize that he's taken a job with Google in California and is finishing up here and preparing a move... OK, now I felt like kind of a heel for taking up an hour of his time when so much is going on.

One of the things I find so surprising about the Posse is that their interest in Java is genuine and infective. Considering that I'm dealing with Java blurbs, weblogs, and articles all day, I would think that the last thing I'd want to listen to in my time off is four guys talking about Java. I should want to run away and listen to one of the 4,000 mediocre anime podcasts in my iTunes directory, right? Yet, I often find myself turning to the Posse to get their take on what's up in Java, to hear them kicking around the ideas and news items featured on and elsewhere.

The latest episode announced dates (March 6-9, 2007) for the "Java Posse Roundup", a small unconference to be held in Crested Butte, Colorado, with the assistance of Thinking in Java authorBruce Eckel. Talking Java by morning and skiing by afternoon sounds like a nice way to spend a late-winter week, don't you think?

We're linking to the latest episode of the Java Posse Podcasttoday, as this grab-bag episode catches up with a number of popular topics among the readership, including the release of NetBeans 5.5, a huge JSR roundup, and Romain Guy's announcement of an upcoming "Filthy Rich Clients" book co-authored with Chet Haase. They also discuss Mono and its relationship to Java EE, the latest GWT release, GMail for Java ME, and more.

Also in the Java Today section, the Sun Grid Cool Apps Developer Contest has come to a close and the winners have been announced. The article Spotlights on the Sun Grid Cool Apps Contest Winners introduces each developer and their winning projects, ranging from Neural Networks and fractal based images to search engines. The article says that "many of the winners are looking for developers to contribute to their project. It's a great way to get started on the Sun Grid!"

Ballotingfor the 2006 JCP Executive Committee Elections ends on Monday, November 13. The election will fill the open seats on the SE/EE and ME executive committees and is open to registered JCP members. SE/EE Executive Committee nominees are Capgemini, Tom Crosman, Jean-Marie Dautelle, Doug Lea, Justen M. Stupka, Evan Summers, and Mauro Do Valle. The ME nominees are Jean-Marie Dautelle, Ericsson AB, and Sirf Technology Holdings, Inc.

Reacting to discussion of the project, James Gosling acknowledges Contribution agreements considered "just stupid" in today's Weblogs. "I happen to agree with the commentator on my post. There ought to be a better way. But contribution agreements are remarkably common. Take a look at the one that the Apache Project uses. It's even longer than ours."

Mohamed Abdelaziz has an introduction to JXTA-based Shoal Dynamic Clustering: "A few days ago was open sourced. Shoal is a java based clustering framework that provides the foundation for building fault tolerance, reliability and availability. The Shoal project was initiated a few months ago as a collaborative effort between the GlassFish appserver group at Sun and the JXTA group at Sun."

Finally, Joshua Marinacci has an update on My first two weeks at Netbeans: "Greetings from Prague. I've been at Netbeans for about two weeks now and it's been quite a busy time. I think I'm really going to like it here. Everyone is very friendly, the city is beautiful, and they have excellent..."

In today's Forums,paulby reports on Project Looking Glass getting a good reception, in the post LG3D at the Ubuntu Developer Summit: "I've spent most of this week at the Ubuntu Developer Summit which has been very interesting. There is an enormous amount of enthusiasm here for visually rich desktops and we hope to capatilise on this energy. The main outcome of the discussions here is that we have been asked to include lg3d in the Multiverse (or possibly universe) for the Ubuntu Feisty release."

docampbell asks: Can we have an additional Web Service contructor generated - please ?: "Can wsimport et. al. please generate, in addition to the current constructors, an additional single parameter constructor that does not require passing in the QName details for the service that is being called (e.g. {http://some.namespace}SuperService)? The reason I ask is that all the QName details are already in the generated class and when specifying a "dynamic" address for the web service, this is 99.99% of the time simply because it is hosted at a different location to the original that was used to generate the code. The QName details for the service are exactly the same, so all I want to do is specify a new location."

zafoe wants total control over his JDIC browser component in JDIC Browser - force native browser version?: "I am looking at the JDIC Browser for a product I am working on and so far really like what I am seeing. But what I would like to do is force the browser to use FireFox rather than any other browser if FireFox is installed. So I guess my question(s) is/are : Can I force the control to use a particular version? And if so ... how do I get a list of installed browsers so I know I can force it?"

In today's News Headlines :

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

Current and upcoming Java Events :

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

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 Archive.

Lunch with 1/4 of the Java Posse  

Don't Give Up Blog

Posted by kfarnham Nov 9, 2006

The struggle to do it with desktop Java

Seemingly the most commented-upon blog in some time is Simon Morris' Blame Java!, whose description asks "when will Java applications 'just work' out-of-the-box on the desktop? I have projects crying out to be written in Java, so why do I find myself considering other technologies? Is 'Java' really a dirty word on the desktop?"

In his blog, Simon rues a recent project spec that he received, stating:

"The software language must not be Java, as in previous tests this has proved to be temperamental with types of hardware and various accessories."

He also talks about a proposal for an audio/video application... and again, Java seems not to be a plausible option:

"Now I've only limited experience of working directly with JMF, but my impression is of yet another desktop orientated technology which has suffered from neglect over the years. It's a shame, because were it not for the above niggles Java would be the ideal technology to meet this client's demands. A number of their requirements seem to fit hand-in-glove with the platform's strengths."

Now the thing that strikes me is that if desktop Java were a total failure, this blog wouldn't have made a ripple, since everybody would presumably have already walked away from Java GUI's. But the opposite has happened: this has already picked up 31 comments in a day and a half. Why? I think it's because there are a lot more people working with desktop Java than is widely understood. Consider last week's poll, which asked "What form does most of your Java development take?" A surprising 35.5% of respondents said "desktop Java applications", a strong second place to "web applications" at 41%. If this is anywhere close to accurate -- and the nature of a self-selected poll on a single website argues against taking the figures too strongly -- it suggests desktop Java should be getting a level of attention similar to that of server-side Java.

And maybe one reason so many people are commenting on the blog is that so many have wrestled with these same issues: the possible absence of the JVM on end-user machines, difficulties with Java Web Start, the condition of JMF, etc. What's worth taking away is how many people are working on desktop Java, and how important it is to them. If it were useless, this conversation would already be over. Instead, what you see is the frustration of being so close, but still hitting some painful road blocks.

JDK 7 feature planners, are you listening? The community is talking.

Also in today's Weblogs, Jean-Francois Arcand works through a server side hassle: One TCP port to rule them all "One thing I hate when I install an application server is the process of determining which and how many TCP ports the application is reserving. On a shared machine, It's even worse because you possibly need to manually change all the reserved ports to start the application server."

Finally, Gregg Sporar is Talking About Static Analysis: "We are fortunate that in the Java world, there are many high-quality static analysis tools available for free. I talked about a few of them the other night at a meeting Austin Java Users Group."

In Java Today, a recent SDN interview features James Gosling on Open Sourcing Sun's Java Platform Implementations. "James Gosling, widely regarded as the father of Java technology, has been hard at work helping Sun Microsystems with its efforts to open source Sun's Java SE (JDK) and Java ME implementations. The Java EEimplementation has been open sourced for over a year as Project GlassFish. We caught up with Gosling recently to get his take on how things are going."

The JSR-142 Inventory API 1.1 Specifications are now available for download from the JSR-142 project; the download contains the Java, JMS/XML and Web Service Profiles. The goal of JSR-142 is "to reduce the cost of integrating inventory products with other OSS components and allow traversal of information across the boundaries of inventory components." The API provides "J2EE/EJB based interfaces to create, remove, update and query inventory entities, entity templates and associations" and "metadata queries and allows clients to receive notifications of inventory events."

In a multimedia tech talk from TheServerSide, NetBeans Architect Pavel Buzek explains how Java EE 5 simplifies development and how NetBeans adds more ease of use with code completion for database mapping, wizards for building complete applications from existing data, and editing annotations.

In today's Forums,jlouvel has an Introduction of the Restlet project: I'd like to quickly introduce the Restlet project which is now federated with the Java WS & XML community. We are building a lightweight REST framework composed of a Restlet API, a reference implementation and a set of extensions. Since its launch at the end of 2005, it has received many feed-back and contributions which help us maturing quickly. We are now close to the final 1.0, but still looking for feed-back.

zmonster is upset about some dubious design choices in Re: Unwanted logging in JAX-WS 2.1: "You honestly think it is appropriate to log a server-side web service fault to the default log level when in fact faults can, and will, happen in the course of normal operation? I can't disagree with you more. The JAX-WS framework logging this situation by default is not only making it appear like my JUnit tests are failing (which they are not), but it also fills up the default log with useless garbage. A low-level framework should be hands-off most every non-Runtime exception, including catching and logging such situations."

Java SE 6's final release may be looming, buttdanecito is wondering if there's not some majorjavax.sound breakage in MIDI Broken in Mustang??: "I seem to see MIDI support broken in Mustang but I believe it is working in 1.4.x and maybe 1.5.x. Has anyone else seen this problem?"

In today's News Headlines :

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

Current and upcoming Java Events :

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

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 Archive.

The struggle to do it with desktop Java  

No Self Control Blog

Posted by kfarnham Nov 8, 2006

Getting your users so enthused they lose their taboos

Apropos of nothing on the front page, I would like to note Kathy Sierra's latest Creating Passionate Users blog entry, titled Two simple words of passion.... And what are those words?

Seattleduck's Kevin Broidy captured the essence of user passionwhen he said, "Passion starts with two simple words: F***ing Cool!"

Kathy's blog specifically cites Tim Bray's use of the term, without the asterisky modesty, to describe Sun's Project Blackbox, a choice of phrasings that didn't sit well with some. Kathy's point is two-fold: first that Project Blackbox really is f'ing cool (heck, it got good press from Robert X. Cringely, who's not often impressed by Sun announcements), and that dropping the f-bomb of coolness is exactly the kind of response you want to get from people.

Granted, Blackbox isn't the kind of thing usually concerns itself with, since it's not genuinely related to Java or the community on this site, so let me point out another example: Aerith. Now while I'll admit that the concept of the big JavaOne demo is probably overused and overvalued, it's to Aerith's credit that after a series of web service and interoperability demos that actually put people in my row to sleep, Aerith's appearance on the screen got a lot of attendees saying "damn, that looks good... that looks like some Mac OS X Steve-note thing... you can really do that in Java? With Swing?! Tell me more..."

The "f'ing cool" application doesn't have to just get by on its looks either. Sure, we were blown away by Google Maps, which does stuff with the browser that didn't seem possible. But frankly, weren't you blown away by the functionality of the first mapping site you ever used, whether that was MapQuest or one of those other sites from the 90's? Didn't you get a thrill from pulling up a satellite picture of your house, or getting arbitrary directions with just a click, instead of having to call someone and asking how to get to their place? These sites didn't have breakthrough presentation... their f'ing coolness came from giving you abilities you didn't have before.

Probably every developer wants to work on one of these apps -- and conversely, the nightmare is to work on a me-too app that copies the competition, and does it worse. Maybe you can do it at work, maybe it has to be a side project. But Kathy's right to point out that f'ing coolness is the goal we all want to attain... that's how your stuff is going to get noticed.

James Gosling has an update on today's Weblogs: "I've been working pretty hard on the community translation website. It's coming along pretty nicely, although it has been a bumpy ride for the past couple of weeks - the lawyers made me shut it down for a few days while I added a 'feature': contributors need to sign a contribution agreement so that we have the right to publish the translations on our website."

In Applet-JAX, Chet Haase writes: "Doesn't at least one of the A's in AJAX stand for Applet? This blog explores some of the ways that we can get more dynamic behavior for applets, mixing with HTML, JavaScript, the DOM, and all that web stuff."

Ben Galbraith's conference announcement also asserts that The Desktop Matters: "I'm happy to announce Desktop Matters, a desktop-focused conference to take place in February 2007 in the Bay Area, California"

In Java Today, Ludovic Champenois points out a NetBeans plugin for working with the jMaki Ajax toolkit inAjax jMaki new Stylized JSP wizards: "Ajax jMaki plugin for NetBeans is evolving rapidly. Now, a new set of JSP wizards is available to create JSP files following well defined CSS styles. After installing this add-on plugin, you'll have access to the jMaki palette for easy Drag and Drop of Ajax components from dojo library, yahoo toolkit, google, etc., as seen in this visual gallery."

A Hibernate tool for the desktop, GenericRCP is a SpringRCP based GUI which enables you to view and change hibernate domain objects. The only thing you need is a jar file containing your domain model and the related hibernate configuration. You can edit simple attributes as well as relationships. With some extra effort you can replace standard controls or whole views with your own and make your GUI more comfortable.

The Java Standard Edition (SE) API's NumberFormat class lets a program parse formatted text that represents numeric values. It provides out-of-the-box localization with little effort and is a useful tool for every Java programmer. Unfortunately, the underlying DecimalFormat class can cause unexpected loss of signs and data without notification. In Resolving NumberFormat's parsing issues, Joe Sam Shirah explains the issues and provides code to handle them properly.

In today's Forums,ixmal considers file-selection dialog options in Re: FileDialog looks wrong under Windows XP: "If the only thing you need is to select some files and directories you may want to use AWT file dialog. Unfortunately, it also looks Win2K-styled on WinXP, and there is a separate bug 6359035 about this. It will probably be fixed in the early builds of 7.0, don't know about 6.0 update releases. I'm not sure if you can just put the required manifest file into the JRE dir (where java/javaw is located) and get the WinXP L&F for all your Java applications, but you should try this. The problem lies in the way how AWT components are written (in any Swing application some heavyweights still exist), in particular, how they are subclassed."

leouser considers the effect of various open-source Java efforts in the thread Re: Activity: "I've thought that a motivator would be to be able to get Java out on more Linux distros. I remember a firestorm brewed when there was a Debian distro. I assume it would be better if there wasn't that type of resistance to Java getting in distros. Maybe I travel in the wrong java communities, but I don't ever recall developers making statements along the lines of 'Im moving to Harmony, once its mature'. Im sure there are some folks out there who would/will, but is it a sizeable group?"

tackline reports an interesting AMD64 server anomaly: "While running someone else's microbenchmark, I found a case of AMD64 server VM running unexpectedly slow. The code below exercises a singleton with a volatile a variable. When running in 64-bit mode, the server VM runs as slow as the client VM in either 32- or 64-bit mode."

In today's News Headlines :

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

Current and upcoming Java Events :

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

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 Archive.

Getting your users so enthused they lose their taboos  

We Do What We're Told Blog

Posted by kfarnham Nov 7, 2006

Why for-each does, and doesn't, do what you'd expect

OK, so it's syntactic sugar. So what's wrong with that? I'm talking about the enhanced for loop that showed up in Java 5.0. Given that, in the overwhelming majority of cases,for is used to iterate over the members of an array or ordered collection, and that developers do so with the same rigamarole of for (int i=0; i < myarray.length; i++), well, why not just alleviate millions of developers of their unnecessary keystrokes? Especially because an expression of the form "for each element in this array or collection, do this..." can be made easier to read by eliminating the trivial mathematic details of the "each" part.

Thing is, it's not always as simple as that. Abandoning the old-style for does give up some expressiveness and control. And depending on how your code works, you could be in for some unanticipated problems with auto-unboxing and handling ofnulls. Nishanth Sastry has the full story in today'sFeature Article, Nuances of the Java 5.0 for-each Loop:

I present eleven short items discussing various nuances of usage, pitfalls to be aware of, and possible optimizations surrounding the use of the for-each loop. In the first section, I discuss what kind of iterations are possible with the for-each. The next section illustrates common programming errors in using the for-each loop. The final section shows how to write new classes that can be used as targets of a for-each loop. I also talk about advanced implementations that allow multiple iterable views; lazily construct objects just in time for iteration; and enable possible generic algorithm and compiler optimizations of the for-each loop.

In Java Today, the JCP SE/EE Executive Committee has approved the JSR specifying the contents of Java SE 6, JSR 270. "In addition to listing new features, this specification also defines a policy for the removal of existing features and proposes the removal of a specific existing feature in a future release of the platform. This release is still under development. At this point in time the JSR 270 Expert Group has approved all of the features listed in this document for inclusion in the release."

The JUGs communityis interested in using its page to promote individual JUGs and their events. "We intend to publish news, advertise projects and let everyone know about the exciting things your JUG is doing. To make your community's activities public to the world , just send an e-mail to      We will evaluate your message and publish it as soon as possible."

What rivalry? Ravendescribes itself as "a build system that leverages Ruby tools (namely Rake and Gem) to let you build Java projects easily. It provides a way to handle dependencies, specific Rake tasks for Java and its Ruby scripting. Why basing your build system on Rake and Ruby Gems? Rake is a very simple build system, it uses domain specific tasks and most of all, it's Ruby scripting! Ruby Gems is a packaging system, a bit like yum, cpan or aptget. It conveniently handles package installation, update and removal."

In today's Weblogs, Vikram Goyal is concerned for the well-being of Java ME in light of a new ME VM effort. In Motorola to develop Java ME stack under Apache, he writes: "In news that is sure to drive further the fragmentation issues of development using Java ME, Motorola has announced that it is going to develop its version of Java ME under the Apache license."

"The saga continues..." in Evan Summers' Pulp Dictionary: Top Ten Reasons to choose Java over um, C#

Finally, Eamonn McManus introduces JSR-262 and WS-Management: "JSR-262 is defining 'A Web-Services Connector for JMX Agents', and I'm the Spec Lead. The Expert Group recently decided to replace the custom protocol that was defined in the Early Draft document with a protocol that builds on the WS-Management standard. Here's the background to that decision."

In today's Forums,robross shows off a simple way to wrapjavaw in Re: How to run Java App without console: "On windows, here's what I do. Assuming your java app is contained in a Jar file named myjar.jar, with a main class attribute in the manifest, so you can run your app with a java -jar myjar.jar command, try this: Create a Windows shortcut. The 'Start In' should be the working directory you want your app to start in, ie, the 'top level' directory of your app. The 'Target' then becomes 'javaw -jar myjar.jar'. When you double-click the shortcut, his will start your app with javaw and won't launch an external command window."

janaudy has noticed a surprising behavior: Swing refresh issues with a rotated display. "I wonder if you guys have seen an issue where a swing application on a normal display runs ok, but as soon as the display is rotated, the gui does not refresh at all!!! How to solve this? Is this a graphics card issue? Is there some magic command line argument to the VM to fix this?"

Finally, dgilbert thinks that how Sun handles the open-sourcing of Java will make or break outside VM efforts, writing in the Re: Activity: "Personally, I think that if Sun does a good job of opening their implementation, then GNU Classpath *will* fade away. Why wouldn't it? The primary goal of Classpath is to create a free(-as-in-freedom) runtime that is compatible with Sun's spec/implementation, so that people can run free Java software without needing a proprietary runtime. If Sun delivers their implementation under similar free terms, then it is going to trump Classpath in most important areas (such as performance, completeness and compatibility) and Classpath's target audience is going to move on."

In today's News Headlines :

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

Current and upcoming Java Events :

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

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 Archive.

Why for-each does, and doesn't, do what you'd expect  

Come Talk To Me Blog

Posted by kfarnham Nov 6, 2006

Conference wish-lists

It's a little over a month before the much-loved JavaPolis 2006 conference kicks off in Antwerp, Belgium. And not too soon to be thinking about JavaOne 2007, which runs May 8-11 in San Francisco.

To keep ahead of the conference game, I decided to use the most recent poll to ask what you look for in a conference. The current front page poll asks "Which style of Java conference do you prefer?". Realizing that lots of factors go into deciding whether or not to go to a conference -- location, time, cost, speakers, tutorials, etc. -- I tried to break up the responses into a few groups that speak to the conceptual differences in conference formats:

  • A single huge conference - obviously, this is JavaOne
  • JUG-run conferences - smaller and more geographically locallized, such as the Atlanta JUG's AJUG Java DevCon 2006, or, for that matter, JavaPolis, which is put on by BeJug, the Belgian JUG
  • Topic-specific conferences - Here, the focus is not geographic, but topical, like ApacheCon (about the various Apache projects), or TheServerSide Java Symposium (server-side focus, so Swing, SWT, and ME developers presumably need not plan to attend)
  • Touring conferences - Some of these are topic-focused (like NetBeans Day), others aren't (No Fluff Just Stuff), but the distinguishing factor is that it's a smaller conference that moves around, so you can wait for the speakers to come to your town.

There are probably other ways to break down the differences between conferences (that's why there's a "something else" option, after all), but this seemed like a pretty useful place to start understanding the relative preferences within the community.

Speaking about conferences, if you want to present at JavaOne 2007, you might want to start composing your thoughts. In today'sWeblogs, Annette Vernon's blog 2007 JavaOne Call for Papers - Coming soon! says that some new topics will be in the line-up: , adding that "the JavaOne call for papers launch is a 'red letter' day for many in the developer community. And you can expect it very soon. Also a sneak preview of 2006 JavaOne Rock Stars."

Also in the blogs, Stanley Ho replies to the white-hot Java Module System discussion in More JSR-277 Early Draft Q & A: "Since the JSR-277 early draft became available, many comments have been raised by some reviewers. Some of the comments are valid concerns and good suggestions, and these are good inputs that will be discussed in the EG (Expert Group). On the other hand, some other are misconception and misinformation, and that's what I would like to address in this blog."

Finally, Kirill Grouchnikov has been Experimenting with scroll panes and scroll bars, and shows off "a little experimentation with translucent overlays on scroll bars in Swing scroll panes. What do you think?"

This week's Spotlightis on Facelets, which offers JSF without JSP baggage. "The web community is eagerly seeking a framework like Tapestry, backed by JavaServer Faces as the industry standard. While JavaServer Faces and JSP are meant to be aligned, Facelets steps outside of the JSP spec and provides a highly performant, JSF-centric view technology. Anyone who has created a JSP page will be able to do the same with Facelets. The difference is under the hood where all the burden of the JSP Vendor API is removed to more greatly enhance JSF performance and provide easy plug-and-go development."

In Java Today, a new program, the NetBeans Dream Team seeks to develop a "community-driven group of highly skilled NetBeans users," to "participate at NetBeans developer events, on mailing lists and developer forums, providing new, interesting and informative content." The program is currently selecting 10 founding members. Claudio Miranda noted the program inhis blog, pointing out that nominations end on November 17.

Are your programming practices keeping pace with hardware developments and the state of the art in enterprise servers? "To take advantage of the multi-core CPUs, the software application must be able to execute tasks in parallel across the CPUs; to take advantage of the 64-bit memory bandwidth, the application must also be able to manage a large amount of memory efficiently. As a key software platform on enterprise servers, Java Enterprise Edition (Java EE) is on the forefront of this multi-core, 64-bit revolution. Java EE developers must adapt to those challenges to make the most out of hardware investment." In the ONJava article Scaling Enterprise Java on 64-bit Multi-Core X86-Based Servers, Michael Juntao Yuan and Dave Jaffe look at the APIs, JVM tunings, and optimizations that will help you make the most of today's server-side hardware.

Synthesizing concepts from several experts, Artima blogger Frank Sommers writes: "In a recent series of conversations, Dan North, Martin Fowler, and Marc McNeill explore what is possibly the fifth Agile principle: Valuing Outcomes over Features. They also discuss the differences between use-cases, user journeys, and features."

In today's Forums,robilad discounts complaints about rival JVM efforts in the thread Re: Activity: "The more free runtimes are out there, the better for all of us, as that means the core Java space is not stagnating, and people are putting their efforts into finding better ways to solve problems. Some of those improvements tend to find their way into other JVMs and class libraries over time, and everyone wins. Free software development is not at all like one of those Highlander movies, where everyone tries to chop each other's head to gain their power."

Romain Guy talks about the ideas behind SwingX Painters in Re: Painter Refactoring: Solving the Layering problem: "One of the driving forces behind painters was that we wanted to be able to quickly produce new components without having to write much code, nor drawing pictures in Photoshop. With painters and a painter editor, I can create nice-looking, highly customized components in a matter of minutes. Why would I want to go another way?"

fester is looking for a TimeZone selection component: "I'm looking for a component that allows to select the timezone. Is there anything out there? I tried this: new JComboBox( TimeZone.getAvailableIDs() )but the list that this reproduces is quite unusable. I would prefer to have a list like on windows (don't know how this is presented on other platforms)"

In today's News Headlines :

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

Current and upcoming Java Events :

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

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 Archive.

Conference wish-lists  

I Will Be There Blog

Posted by kfarnham Nov 3, 2006

Who's up for some geek retail?

It's going to be a somehat indulgent blog today.... I need to get in the rest of my work done soon before picking up Keagan from preschool, after which he, I, and Quinn are off to Atlanta's shiny new Fry's Electronics, which opens today. Actually, they've had a location on the other side of the city for two years (yeah, we went to the grand opening of that one too), but the Alpharetta location will be about 15 minutes closer, and doesn't require driving on I-285, which is always a good thing (ask anyone from Atlanta about the "top end perimeter" sometime). There's still not one near us in the northwest suburbs, but we're used to retail purgatory: our malls suck and there's no Apple Store out here either.

So what is it about Fry's that earns such geek cred? I was introduced to it in college back in 1986 or 87, by a college roommate whose Atari ST needed more RAM. Fry's was already well-known as the go-to "gray market" computer store -- the parts and technicians weren't factory-authorized, but they were as good or better than the official stuff, and cheaper too.

The stores are huge, and often have themes, like the Wild West theme used for the hard-to-find Palo Alto, CA store (true story: when I was in college, I tried to sell advertising space to companies operating out of the storage units in the warehouse that later became the Palo Alto Fry's). But the other thing that's so cool about Fry's is that while other big electronics retailers in the U.S. clearly began life as stereo/TV stores (Best Buy, Circuit City) or appliance stores (BrandsMart USA, H. H. Gregg), Fry's obviously evolved from a computer store. None of the other big-box retailers has all the parts for you to make your own PC, or hard drives in every possible combination of size and connection type, or Cat-5 plenum cable by the quarter-mile, or ancient cables that like one person somewhere actually needs ("look, Herb, they have the SCSI-to-ethernet adapter for the PowerBook 100 series!"... and you think I'm kidding, but I'm not). There's a long-running joke that Fry's stocked everything needed to create Silicon Valley: soda pop, snacks, circuit boards, software, and pornography.

Anyways, Keagan likes it because they usually have demo PS2's or XBoxes playing Dance Dance Revolution or Guitar Hero, and Quinn's usually good with a balloon and a cookie (hey, she's 1, she has simple tastes). Me, I need an external drive for the Cube (maybe the Mini too). Maybe a little Christmas shopping too... they have some 512 MB MP3 players for $10. Oh, and I have to dog-ear the secret page of QuickTime for Java: A Developer's Notebook to see if anyone ever buys it.

Anyways, we'll probably be there around 2 or 3. I'll try to post some grand-opening pictures to my Flickr account if time, weather, and batteries permit...


Speaking of getting together, the latest Poll asks "Which style of Java conference do you prefer?" Cast your ballot on the front page, then visit the results page for current tallies and discussion.

The JCP has gotten the go-ahead to rework its own process, as noted in Java Today. The JCP SE/EE and ME executive committees have approved JSR 306: Towards a new version of the JCP. This JSR proposes changes to the JSPA and to the JCP process document to increase transparency, optimize JSR duration, increase individuals' participation the JCP, permit non-Java implementations of JSR's, allow liaison relationships with other standards organizations, ease migration of existing standards into JSR, and make TCK and licensing information available upon completion of a JSR.

Tor Norbye reports on NetBeans 5.5and its virtual Visual Web Pack, which bundles the visual web page design functionality from Creator into NetBeans. "There's another big reason why even Creator users should try the visual web pack (which is in technology preview state, not a final release like NetBeans 5.5.). It offers new support for Java 5 language features, as well as Java EE 5 support. I took it for a quick testspin and thought I would show it in action here."

TechCrunch looks at the Java ME implementation of Google's mail service in Gmail For Mobile Launches Today: "I've had the chance to test out Gmail for Mobile over the last week on a Sprint Samsung A900M phone. The software was pre-installed by Google, so i can't speak to the process of installing the application. But logging in and using email was the best email experience outside of a Blackberry I've ever had on a mobile device. Specifically, the use of ten hotkeys to compose, send, search, etc. speads things up significantly."

Alexander Potochkin has simplified some of his SwingX code and presents the results in today's Weblogs. In KISS principle: JXButtonGroupPanel followup, he writes: "the JXButtonGroupPanel from my previous blog is rewritten to make it easier to use. Just substitute JPanel with the new JXButtonPanel and enjoy arrow keys support for your buttons!"

In WMS Tiling, or why OSGeo is not a standards body, Jody Garnett discourses "On why the "Tile Map Service Specification" is not a standard..."

Finally, Felipe Gaucho notes the Jazoon 07 Call for Papers: "The deadline of the Jazoon 07 Call for Papers is coming. This promises to be one of the best Java events in Europe during 2007, and a great moment to promote your Open Source projects. Check it out."

In today's Forums,javaluva wants to do EJB3 Persistence to a HashMap: "I would like to know if it is somehow possible to map the result of a Query in EJB3 to a HashMap instead of to the various fields of an object. I do not know at design time which columns my ResultSet would have, but this can always be determined at runtime by using the meta data of ResultSetMetaData of the ResultSet. I would like to retrieve the Result as: HashMap<String,List<? extends Object&rt;&rt;, where the HashMap would be keyed on the column names of the ResultSet and the value of each key, a List of whatever type the values is in for that column."

News from the JDIC project: michael_shan announces that the Next build 20061102 is partly ready: "Next build of JDIC is partly ready now... more work is still needed for crossplatform version (mainly to include Mac build). Builds for Win, Linux, Solaris and Mac are all ready. You're welcome to download and try them first."

In today's News Headlines :

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

Current and upcoming Java Events :

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

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 Archive.

Who's up for some geek retail?  

Swept Away Blog

Posted by kfarnham Nov 2, 2006

Sweep through XML at build-time

Ken Arnold used to say that XML typified the tendency of all markup languages to devolve into prodcedural languages, and that Ant was a particuarly obvious example of that. Certainly, Java programmers put XML to a large number of uses: deployment descriptors, property and config files, messaging, serialization, and of course, as a build-scripting language with Ant.

Unsuprisingly, not only are many developers proficient with XML within their code, they also need to wrangle it throughout their development process. And after your Ant build.xmlreaches a certain level of complexity, there's a good chance you'll want Ant itself to perform some sort of work on your XML files. And Ant's core tasks hit their limits pretty quickly.

In today's Feature Article, Brian Agnew shows off an Ant task that will help developers who need Ant to do some heavy lifting at build-time. In XML Manipulation using XMLTask, he writes:

XMLTask was developed to provide a mechanism for changing XML files in a simple and consistent fashion, providing tools to help with commonly encountered requirements in Ant builds. XMLTask allows developers to identify sections of XML, then insert, remove, and cut/copy/paste content. Content can be read from files, and moved between XML documents.

Read on to see how this XPath-based approach allows you to add, remove, change, copy, paste, comment, uncomment, and otherwise wrangle your various XML files.

In Java Today, the JavaTools community has just released the 100th issue of their community newsletter. To commemorate, the edition contains some special features: a "30 Days IDE Swap Experiment", in which four developers swap their IDEs for 30 days and tell us the story, "Two Years of JavaTools Statistics", in which Daniel Lopez shows some very interesting statistics from the community that give us some insight of what people look for in the Java universe, a new "From the Trenches" section, the Java developer Ibon Urrutia tells his pains and joys when making a real world JavaME application, and more.

Ballotingis underway for the 2006 JCP Elections. Through November 13, JCP members can vote to fill the open seats on the SE/EE and ME executive committees. SE/EE nominees are Capgemini, Tom Crosman, Jean-Marie Dautelle, Doug Lea, Justen M. Stupka, Evan Summers, and Mauro Do Valle. The ME nominees are Jean-Marie Dautelle, Ericsson AB, and Sirf Technology Holdings, Inc.

The Compute Serverproject has released version 0.7. In this release, the team has implemented support for collecting and visualizing execution statistics as well as support for including Compute Server infrastructure code in debugging sessions. There have not been any changes made to the existing Compute Server APIs; Compute Server projects created with release 0.6 are compatible with the 0.7 release

Today's Weblogsstarts off with some interesting hacks in Mason's Blindingly Obscure Tips & Tricks, Vol. 1, in which Mason Glaves writes: "Every so often, even after working with Java for 10 years, you will find yourself blundering into a blindingly obvious solution to a small problem that you never even remotely considered before. After I finished bonking myself on the head for never thinking of them before, I thought I would share what I have stumbled across in the last few weeks."

In A new NetBeans Platform Sample: AudioStation, Rich Unger writes: "Tim, Jarda and I taught a workshop on NetBeans plugin development at OOPSLA last week. As part of that course, I cooked up a new sample app to showcase the platform. It's a simple WAV file editor which showcases the use of the Lookup API to plug different visualizations of the WAV file."

Finally, writing from Prague, Joshua Marinacci has a A quick intro to HttpClient: "The following is a techtip I wrote which wasn't used. Since I turned out pretty well I thought I'd post it here. Let me know what you think. Would you like more of these small self-contained tips? "

In today's Forums,brettneumeier expresses concern about the Visibility of the open-source-Java process: "I'm sure that Sun is making progress internally at open-sourcing the Java platform. However, I have not been able to observe any of this progress myself, as an open-source developer. My question is: is there any way that people like me can see what is actually happening in terms of releasing Sun's Java implementation as free or open-source software? I had thought that this forum would be the best venue for engaging directly with Sun on this topic, but it does not appear to me that very much is happening here. The last public statement that I have seen from Sun was on August 14. There haven't been any blog entries on the aggregated blogs pertaining to open-source Java since Sept 27, and it and the two previous entries I saw were just discussing version control systems and bug-tracking systems to be used for open-source Java."

joshy explains the concept of Painters and their difference from look-and-feels in the thread Re: Painters quick question: "Essentially Painters bypass the look and feel. They are the equivalent of subclassing a component and overriding the paintComponent() method. However, Painters let you do this without subclassing, and you can do it quickly by using existing painters or building them with our gui tool. [...] Painters do not serve the same purpose as a L&F. If you want to affect every instance of a particular component in your application, (like all buttons), as part of a larger themeing effort then you should use a custom Look and Feel. However, if you want to change just a few components then you can use painters."

In today's News Headlines :

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

Current and upcoming Java Events :

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

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 Archive.

Sweep through XML at build-time  

Filter Blog

By date: