Skip navigation

Questioning the value of a "Swing 2"

Background: with parts of the Swing community concluding that Sun's emphasis on JavaFX implied a de facto abandonment of Swing, Jonathan Giles posted ideas last month for a Swing 2.0, a cleanup that would modernize the code-base to at least Java 5 standards: generics for collections, enums for enumerated constants, etc., without taking on the additional work of delivering significant new functionality. Danny Coward's replyfocused instead on the improvements to the SE platform that will be of critical importance to Swing developers: graphic performance improvements, robust deployment, etc.

Elliott Hughes follows up to the "Swing 2" blog by writing:

Danny Coward respondedbut appears to have been too polite to get the point across.

That's where I come in.

His blog Swing 2: P-----g in the Wind [title redacted] is a thorough denunciation of Jonathan's proposal as off-the-mark and pedantic:

I've written and worked on numerous Swing applications now, and can honestly say that none of the ideas mentioned so far for the third-party "Swing 2" would have helped in any way.

The gist of Elliot's argument is that the proposed clean-up is of solely academic interest: it wouldn't make Swing code easier to write, work better, or enable developers to do things they can't do already. On the latter point, he clearly implies that Swing is crippled by lacking "functionality that was old hat even in the days of Windows 95", naming about boxes, font dialogs, and an embeddable browser component as glaring and obvious deficiencies of Swing's feature set.

There's a lot of tough love in here, and it comes from someone who actually uses Swing. In a sense, it reminds me of a comment on the O'Reilly Editors' list a few weeks back, that the Linux community should be grateful for the Linux Hater's Blog, as it's written by someone who knows Linux and cares enough to see its flaws for what they are, rather than a fanboy who pretends Linux is perfect, or fanboys of other platforms hurling insults with no basis in fact.

Swing people know best what Swing needs. Do they get a say?

In Java Today,The Aquarium points out a New JCP JSR Status: Inactive, which the JCP has applied to "non-final JSRs that have not posted a milestone within the last 18 months." Eduardo Pelegri-Llopart notes, "The JCP pages have already been updated; check out the JSRs by Stage and the full list of Inactive JSRs. The list includes JSRs led by large and small companies, Sun and non-Sun. Some of the JSRs are very old, some just break the 18-month boundary."

For playing around with JavaFX, A. Sundararajan points out the availability of a JavaFX interactive shell: "JavaFX compiler has a built-in script shell - Per Bothner has implemented a read-eval-print loop facility for JavaFX. The script shell class is in the openjfx-compilerrepository and not in the JavaFX 1.0 binary."

In today's Weblogs, Rama Pulavarthi updates the JAX-WS RI 2.2 Status. "Its been a long time I blogged. You might be wondering what we are up to with JAX-WS RI lately. We are busy implementing the JAX-WS 2.2 RI."

In Atmosphere: state of the union, Jean-Francois Arcand writes, "The goal of Project Atmosphere is to bring Comet to everyone, everywhere. What the status of the project? Read on..."

Finishing up his series on game board modeling, Sergey Malenkov shows the math behind the Hexagonal tile map. "To supplement the posts about the triangular and square tilings, let's consider the third type - the hexagonal tiling. This is my favorite one. Each hexagon has more non-diagonal neighbors than a square. It simplifies calculating distance between two tiles. The main disadvantage of this tiling is that the axes are not orthogonal."

Inspired by a forum post on ME behavior on real-world devices, the latest Poll asks "are complaints about ME fragmentation overblown?" Cast your vote on the front page, then visit the results page for current tallies and discussion.

In today's Forums, Potociar Marek uses the followup Re: Architecture: WSIT Integration into Metro to explain what Metro is and isn't reponsible for. "The Metro processing tubeline is based on the chain of filters/ interceptors design pattern. Still, it is orthogonal to the notion of JAX-WS SOAPHandler. Metro processing tubeline is the heart of "streamlined" SOAP message processing concept in Metro. As such it is a Metro-specific implementation detail and has no connection to JAX-WS API or specification. To dive a little deeper, one of the tubes which is a part of the Metro tubeline is a HandlerTube which is responsible for invoking registered JAX-WS SOAPHandlers. So basically all JAX-WS handler processing takes place at one single predefined place in the whole Metro tubeline. You can view JAXWS handlers as a high-level and portable API for processing SOAP messages, while Metro tubes are non- portable, low-level (but very flexible and powerful) SOAP message handlers/processors."

ksak explains what happens when your EJB throws an exception in Re: GlassFish Cannot Find SFSBs After a RuntimeException. "This is the spec-defined behavior for stateful session beans. Each injection of a stateful session bean reference results in a new stateful session bean identity. Here, the "client" is the servlet instance itself, of which there is typically only one per web application. If the bean instance throws a runtime exception the container must destroy it, which means any other invocations on its reference will result in NoSuchEjbException. This is one reason it's not recommended to inject a stateful session bean into a servlet instance."

Finally, Vince Kraemer offers GlassFish tooling advice in v3 and NetBeans 6.7 M2. "Folks may know that the NetBeans project just published version 6.7 Milestone 2 which is available here: Folks may not know that it is easy to start doing Java EE 5 development against recent v3 promoted builds by using the information that you can find here: Please give it a try."

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.

Questioning the value of a "Swing 2"  

Renegade Blog

Posted by kfarnham Feb 26, 2009

So one phone doesn't work like another... so what?

We've heard a lot of unhappiness over the years from the ME camp over fragmentation, loosely defined as the dissimilarity of implementations of ME specs and other differences between devices (screen size and color depth, input technologies, etc.), which make it difficult to write applications that run on all/most/some/two devices.

Some people, often handset makers, have argued that fragmentation is good, or at least that the complaining is an overreaction. Without the ability to make devices different, they say, there would be no innovation.

An even more extensive argument of this sort appears in today's forums. In a reply to a long-running thread, Re: Touchscreen Support, signal3 addresses a complaint about the seeming flexibility of the KVM spec, by saying that a more crossed-t, dotted-i world is unrealistic:

Why are there so many different behaviors on the world's myriad of phones? Simply because it's a big world, and... not all vendors/developers create products of equal quality. Remember, quality is a subjective and philosophical notion so what someone thinks is good another may think is bad. Personally I think that "variety is the spice of life" and I don't see this as being a bad(tm) thing. Ultimately, the "invisible hand of the market" should determine what is good over time, but... in the short term, the market acts more like a popularity contest than an objective measure of "good"[...]

Are there too many non-mandatory options in the specification? Again, it depends on how you define "too many". However, the intention and spirit of the specifications is to be rigid where they need to be; flexible where they are allowed. My opinion is that the specifications do a rather good job of balancing the two... allowing vendors to optimize and customize things where they can while at the same time insuring a high level of compatibility between competing products.

signal3 then explains a story in his/her own application about working through different behaviors on different phones, saying that both behaviors make sense in context of making affordable small devices, and implying that it's up to the developer to care about, test, and fix this stuff. The author goes on to make the "fragmentation is good" case, and a lot better than it's usually made:

Anyway, it's easy to get frustrated by this stuff, but the alternative is certainly more bleak. Consider it a lesser of two evils... in one case we could have a perfectly rigid specification (in which the Java-ME platform would degenerate into a product) or we could allow flexibility where it is needed to insure that Java-ME remains a competitive platform. This way different products can deliver the benefits that their intended users demand (instead of what an arbitrary vendor may dictate). It's very important IMHO to understand the differences between a platform and a product. Java-ME & its configurations aren't really tangible products, they're platform specifications.

Do you agree? Are you willing to work through the incompatibilities for the sake of having an ME world with highly different devices that your app can run on? What are the alternatives? No variety, or writing for one device at a time? What do you think?

Also in today's Forums,mustberahul hopes to deploy a JavaFX app in a JSP, inRe: How to: JavaFX as Web Application. "Actually I have used sample Applications of JavaFx from NetBeans IDE and I have successfully executed it. Now My Problem is I want to use this JavaFx at Client Side. If I create a normal web application in NetBeans which consists of JSP and Servlet in that How can I use JavaFx ? . Please can you provide detailed description of using JavaFx in JSP . is it possible to use JavaFx in JSP ?"

zulu posts a newbie question about Metro depoyment. "I am starting off with Metro web service stack and had some initial questions. In our dev environment we plan to use Tomcat/Glassfish but the final deployment will be on Websphere 6.1. My question is do I need to have the complete stack in place or can I pick only those jars from the Metro stack which are being used (essential ones). Also do I need to make these Metro specific libraries available as part of my application or are they available in the respective containers."

In Java Today, The NetBeans team is pleased to announce the availability of NetBeans IDE 6.7 Milestone 2 (M2). New features include greater Maven integration, an "ergonomic IDE" performance improvement, enhanced self-diagnosis, SVG improvements in Mobility, and improvements to the profiler, C++ tools, and the Mac look and feel. Visit the download page to choose and download the NetBeans bundle that's right for you.

The newest novelty posted to the JFXStudio site is TweetBox, a cool Twitter client built in JavaFX. Creatorblokmark writes, "for quite some time now, I have been "noodling" this Twitter client in JavaFX to teach myself JavaFX and really go way beyond hello world. I had to go through the painstaking process of migrating to many JavaFX preview SDK code to 1.0 code, but that also tought me a lot about the changes too." AWeb Start version is available, as is source.

The latest edition, issue 191 of the JavaTools Community Newsletter is out, with a reminder about Duke's Choice Awardsnominations, tool news from around the web, announcements of new projects in the community, and a Tool Tip on "Git: a new approach to version control".

The latest Java Mobility Podcast is Java Mobility Podcast 72: Java ME SDK, in which Tomas Brandalik and David Pulkrabek talk about the new features in the Early Access release of the Java ME Software Developer Kit.

In today's Weblogs, Santiago Pericas-Geertsen links to a screencast on Developing SGMP Connectors using JAX-RS. "Last week we announced the availability of version 1.1 of the Sun GlassFish Mobility Platform (SGMP), formerly known as Mobile Enterprise Platform (MEP). In the previous version, a connector could only be developed using the ECBO API; in this new version, a connector can also be developed using JAX-RS. The attached screencast shows how to develop a JAX-RS connector using Netbeans 6.5 and Maven. Next time we'll focus on how to deploy a JAX-RS connector."

Arun Gupta points out a GlassFish setup for 120 programmers in University of Copenhagen. "Sidsel Jensen is a Sun Campus Ambassador at University of Copenhagen, Denmark. She configured GlassFish in her department to be used by 120 freshman programmers. Starting with a standard HP DL360 G5 rack server, installing Gentoo Linux, NetBeans for deployment of web apps to a remote GlassFish, creating multiple domains and even performance tuning the Application Server."

Finally, continuing his game mapping series, Sergey Malenkov shows how to use a Triangular tile map. "Recall from the previous post there are only three regular polygons that can be used as tiles. Let's have a look at triangles now. Such tiles are practically not used in games because there is no direct path on the map and the game unit should be turned at each tile. Besides, it is rather hard to place units within acute corners because a lot of free space is wasted."

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.

So one phone doesn't work like another... so what?  

Borrowed Time Blog

Posted by kfarnham Feb 25, 2009

Filling out a JCP EC term

The Planetarium passes along the announcement that voting begins today for the JCP special election.

There's a vote now, to fill a vacant seat on the Java ME EC. There are 4 candidates fighting for this seat. Aplix, who build Java implementations for mobile phones, Cox Communications, big in home entertainment (particularly TV), and two active Java ME developers Shawn Fitzgerald and Marlon Luz, standing as individuals.

The JCP has provided a forum on its site for statements from the candidates and for Q&A with them.

JCP members (as individuals or primary contacts for their company or organization) should have received voting information from the JCP already. Balloting closes March 10, and the winner will serve out the term resigned by Intel, which ends in December 2010.

In other JCP-related news in the Java Today section, the JCP SE/EE Executive Committee has voted (12 yes, 1 no, 1 abstain, 1 not voting) to approve the public review of JSR 316, the Java EE 6 "container JSR". The spec adds JSR 196 (Java Authentication SPI for Containers), JSR 299 (Web Beans), JSR 311 (JAX-RS: Java API for RESTful Web Services). EE 6 also introduces a "profile" concept for defining task-specific subsets of the EE stack, such as a "web" profile that omits parts of EE that would not be useful for or relevant to web-based applications.

In the Devoxx keynote video, JavaFX: The Platform for Rich Internet Applications, Danny Coward presents the Top Ten Things developers need to know about JavaFX, from graphics to video, NetBeans to the JavaFX Production Suite, and offers a variety of slick demos and a roadmap for the future of the platform.

Today's highlighted Forum messages are all about GlassFish, starting with, dgibson's Totally New to GlassFish - Multiple developers on one server. "Our company has just decided to go Open Source for nearly everything. I've been tasked with learning how to setup GlassFish for our application server. Ideally, we would like to be able to setup one development GlassFish server (on Ubuntu Linux) so that each of 5 developers can develop, deploy and test their web apps independently of each other I've been reading about clustering, instances and domains, but I cannot seem to get a clear handle on how to go about setting something like this up. We have a similar environment currently running on Solaris and WebLogic and were hoping to be able to do it on GlassFish."

mgibbens is open to suggestions on how to handle versioning in Web service major version, best practice. "I have a question about Web Service versioning best practice. I am introducing a new version (v2) of an existing web service (v1), to incorporate a minor change in the schema. A header field which was optional, is now required, and so v2 is not fully backwards compatible with v1. I could import the v1 schema into the v2 schema, and define a new v2 header element. However, since the v2 schema has a different namespace to the v1 schema, then I need to use a mixture of v2 and v1 elements in the XML."

Finally, tenglish wants to know how to roll out Glassfish in the DMZ. "We are getting ready to deploy our first Java based service into our DMZ. We have a requirement to create services that can be consumed by many different client types. This led us to designing web services. As a team, we have not come across any good documentation on best practices for deploying public facing web services into the wild. I would like to ask the user community some rather basic "how do you..." or "we are thinking of doing X. Is this how you do it?" questions..."

Tday's Weblogsbegin with Terrence Barr's Newsflash! iPhone UI, JavaFX in 15 mins, Devoxx keynote, developer survey, and more ... "There's been a lot of news bits and snippets of information rolling in over the last two weeks - in fact, too much to cover in a single blog entry. I thought I'd compile some of the more interesting bits..."

Also, Marina Sum links to a look at Sun OpenSSO Enterprise In the Coming Year. "Watch the video of a Webinar by Sun's Jamie Nelson and Daniel Raskin on the 12-month roadmap of Sun OpenSSO Enterprise, the commercial release of OpenSSO."

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.

Filling out a JCP EC term  

How much catch-up does JavaFX have to do?

O'Reilly Inside RIA blogger Yakov Fain wonders if JavaFX can replace Flex for him, and tries it out in Pet Store with JavaFX 1.0. Part 1.

We decided to contribute to Java community and invest some time and resources to figure out what JavaFX 1.0 is capable of. Most of the Java developers know what Pet Store application is. For many years this reference implementation has been used by Sun Microsystems as a part of Java BluePrints program for Java EE platform. [...] We re-used the existing back end of the Pet store, but performed a little facelift by replacing the UI developed with AJAX/JSP/JavaServer Faces with JavaFX 1.0.

So what's the verdict? Mixed. Here's the good news.

For example, ActionScript doesn

New concerns about Swing's status

Last fall, one of the big stories in the Java community was the status and future of Swing, after it was revealed that Sun was no longer funding a developer on the SwingX project, a move that Kirill Grouchnikov took to be a de facto freezing of Swing. In Sun setting down on the core Swing, he wrote:

All i know is that JavaFX has effectively halted all core Swing development. Over the last 18 months, we have seen significant architectural initiatives (JSR 295 and JSR 296) changing leads and frozen. All client-facing improvements in Java2D, AWT and Swing in Java 6 Update 10 are completely driven by the requirements of JavaFX

So, about JSR 296 specifically... in July, the question came up as to whether it was in a "coma", with the departure of its founder. But in August, Alexander Potochkin took over as project lead and updated the project status in his blog.

But have things gone dark again? Anthony Goubard complains that work on the Swing Application Framework seems to have seized up again. In the Javalobby post The Swing Application Framework Still in Coma, he writes, "As already said a few months ago, there is no activity on JSR 296 (SAF) and nothing much has changed since then. Note that this JSR is a candidate for inclusion for Java 7. In the meantime Alexander Potochkin has taken the Spec lead and worked a bit on it a few months ago but for a least the last 3 months it's again quiet from Sun."

As recently as last week, we had unofficial Java 7 content-tracker Alex Miller predicting that JSR 296 would be in Java 7, following Mark Reinhold's inclusion of it in his Devoxx 2008 presentation on Java 7 features. So if the Swing App Framework really is in trouble, that's going to be an unpleasant surprise to a number of people.

Also in Java Today, A. Sundararajan has posted a slide set introducingJavaFX for Java and JavaScript programmers. "I missed attending and speaking at Sun Tech Days at Hyderabad due to a personal reason. In fact, I prepared slides for a talk titled "JavaFX for Java, JavaScript programmers". This is much like my earlier language comparison blog entries such as Java, JavaScript and Jython, Java, Groovy and JRuby etc. The idea is to learn a language by language comparison - and not to conclude "better"/"worse" language and so on. [...] Although I could not attend Sun Tech Days, I am posting the slides here : slides in a .pdf file"

In A tale of three code generators, Andrew Haley digs into the bytecode generated by Zero/Shark, GCJ, and Hotspot. "Shark is a port of OpenJDK that uses LLVM to do JIT code generation. While Shark is pretty fast when compared with OpenJDK's C++ interpreter, it's still quite a lot slower than gcj. gcj is a fairly straightforward bytecode->native compiler and doesn't use many of the Java-specific optimizations in HotSpot, so I was of the opinion that Shark and gcj ought to be similar in speed. So, I wanted to find out why Shark was slower than gcj."

There's an interesting bit of JCP Elections outreach being spotlighted in today's Weblogs. In JCP EC candidates ready for questions in election forum, Sean Sheedy writes, "four candidates are competing in a special election for Intel's ME EC seat, vacated in January. For the first time, a forum has been created to permit questions from the community and encourage debate between candidates. Please make this election interesting and help surface the best in the candidates by visiting"

Volker Simonis shows off some heroic backward-compatibility in"We need a 'dirty hack' (but a brilliant one)...". "Usually it's not big fun to be "supporter of the week" but recently, when I was on duty, I got this somehow unusual request on our support queue. If you're interested in Bytecode Instrumentation and Rewriting, Classloaders and Instrumentation Agents read on to hear the full story..."

In today's Forums,tjquinn wants opinions from GlassFish users in If you deploy app clients we need your feedback on some choices in v3!. "We want to improve several things with app clients, in particular the launching performance when you use the appclient script. (This topic does NOT apply to the Java Web Start support for app clients in GlassFish.) We have some choices to make and we want your feedback. The options have advantages and disadvantages. Please read the summary below and reply to this entry to let us know what you think. If you see other pros and cons or think of other options we should consider please mention them. "

tamir gives some idea where LWUIT is going, in the followup Re: Any example to make LWUIT work with Xlet? "Our road map, that will include also the Xlet support, will be implemented soon, but i don't want to commit for how close it will be released. So please stay tune for our next SDK drop and our coming soon announcements. I encourage you to register to our email alias: announce [at]" 

Finally, rosstheboss wants to use LWUIT for an Autocomplete Textfield. "I'm working on creating a auto completing text field, a bit like the example I once saw on the blog. I'd like to have a suggestions list (scrollable) appear underneath the text field appearing to be part of the text field, and overlaying any other components on the field. An example of how this best works is the search within firefox. Any suggestions on an approach to this would be great, I'm going to handle data using a model and filterproxy."

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.

New concerns about Swing's status  

Down To Earth Blog

Posted by kfarnham Feb 20, 2009

NetBeans releases to get smaller, more frequent

Release early, release often. Many projects swear by this strategy, but is it as practical for big projects with thousands or millions of users as it is for the small and scrappy?

NetBeans seems set to prove it out, according to the announcement Message from the NetBeans Team: Why NetBeans 6.7?

For those of you who have been following the NetBeans release train, you may be puzzled by the version number switch in our upcoming milestone release, from NetBeans 7.0 to NetBeans 6.7.

To get innovation and quality improvements out to the community faster, and to have the NetBeans IDE be better aligned with the release schedules of other technologies that it supports, we have decided to concentrate on a series of smaller releases rather than the traditional two big releases per year.

The announcement goes on to say that the NetBeans numbering scheme will continue to use point releases for feature releases that maintain API compatibility, while whole number jumps will indicate major changes and possible API incompatibilities.

So, with this new 6.7 version tracking for June (conveniently in the JavaOne timeframe, of course), what can we look forward to?

NetBeans 6.7 is scheduled for release in June 2009. The main features are Maven and Kenaiintegration, and there are many smaller features that you can read about on the New and Noteworthy page. Java EE 6 support is planned for a future release.NetBeans 6.7 Milestone 2 is due out next week. We encourage you to download the release when it becomes available and to give us your feedback.

It's possible that the really important point that might get overlooked here is that NetBeans now supports so many other technologies, that it needs more frequent releases so that those other projects can enjoy tool support from NetBeans. In the end, that could be a big win for everyone.

Also in Java Today, Glassfish Web Space Server is Sun's next-generation portal server platform. Based on the Liferay open source portal project, it enables businesses large and small to pull together applications and content from a variety of Web-based and internal sources and present them as a unified, customizable portal on Web browsers, kiosks, and mobile devices.

Danny Coward points out a guide to burning your BD-J application onto a real disc in Java ME: Burning a Blu-ray disc. "This new video guide shows you how to take a Java application (get source), built for Blu-ray, emulate it running on your PC, and then burn a test disc so you can run the app on a real Blu-ray player (like the PS3). It's is an excellent guide as to how to get started with Blu-ray app development."

Notice: will be unavailable from 02/20/09 7pm PST to 02/21/09 7am PST due to a Planned Maintenance Outage. (CollabNet will be performing system-wide changes to maintain and upgrade common infrastructure components such as power, network, and storage).

In today's Weblogs, Jean-Francois Arcand jailbreaks and Grizzly-fies his iPhone in Extending the Grizzly HTTP Runtime part VI: Writting A GrizzlyAdapter customized to run on an iPhone/IPod Touch To support the Mozilla foundation (and others) against Apple, I've decided to install Java on my iPhone and run the monster. Let's write some GrizzlyAdapter that snoop iPhone personal data!


Little Wonders Blog

Posted by kfarnham Feb 19, 2009

Behold the one-class project

It seems like there's an interesting story behind the UrlEncodedQueryStringproject. Its page says "this project was developed in close collaboration with Sun over a period of 18 months as part of the Peabody initiative, in response to this RFE. For various reasons it did not make it into the JDK, so is instead released here under a BSD license. Full transcripts of the design decisions behind this project can be found here."

The project itself consists of a single class (OK, two if you count the unit test). So what's so important about it?

An instance of this class represents a query string encoded using the www-form-urlencoded encoding scheme, as defined by HTML 4.01 Specification: application/x-www-form-urlencoded, and HTML 4.01 Specification: Ampersands in URI attribute values. This is a common encoding scheme of the query component of a URI, though the RFC 2396 URI specification itself does not define a specific format for the query component.

This class provides static methods for creating UrlEncodedQueryString instances by parsing URI and string forms. Methods for creating, retrieving, updating and deleting the parameters on a query string, and methods for applying the query string back to an existing URI."

At first glance, this looks pretty interesting and broadly useful for composing or pulling apart query string URLs. It makes you wonder why it didn't make the cut for the JDK, and a link to design discussions is a dead-end as it's only available to project members. And if this class isn't going to clear RFE 6306820, I guess we have to assume the bug will stay in the "accepted" state indefinitely, or will it become a "won't fix".

Or maybe it doesn't matter. With the class released under a BSD license, its features are available to anyone who chooses to download it.

Also in Java Today, a new InfoQ article by Derek Frankforth looks at Distributed JBI with GlassFish. "The Java Business Integration (JBI) specification, known as JSR 208, describes an Enterprise Service Bus (ESB) and its interactions. These interactions are described in terms of components plugging into a software bus to exchange information. This construction, at first glance, appears to create a system where all pieces reside in the same process or virtual machine. OpenESB, an open source implementation of JBI, includes a homogeneous topology option using clustered JBI instances when run in a GlassFish Application Server. This allows for scalability and load balancing by increasing the number of clustered instances. Recently, a prototype implementation of a component called the Proxy Binding, allows OpenESB instances to be transparently linked together using a heterogeneous topology, much like extending the bus over a network. This article will describe and contrast the strengths and weaknesses of the two different styles of distributed access as applied to the OpenESB environment and show how in the end they complement each other."

In a new interview, Artima's Frank Sommers talks to Eran Davidov, Sun's director of Java engineering about Scaling JavaFX Applications Across Devices. In it, they talk about the respective roles of the developer and the runtime in adapting to different environments, the ability to discover and react to device characteristics like screen size, and whether you should have to create different versions of your application to target different devices.

In today's Weblogs, James Gosling reports that India is amazing! "It's the end of day 1 of Tech Days in Hyderabad. What a great crowd! The locals were apologizing that "only" 6000 developers were there: the conference center is only big enough to accommodate 6000 attendees, and it's the largest conference center in India. The place is just jammed."

Xuan Yun shows how to Customize Renderer of JComboBox in Synth Look And Feel. "Customizing the JComboBox style in Synth look and feel is a little complex, I can write a long article for it, but I don't want to be too tired, so please let me share my experience piece by piece."

Finally, Van Riper promotes the Benefits of JUG-USA Affiliation. "The opportunities afforded by affiliating together all the JUGs residing in the United States as part of an umbrella JUG-USA organization seem self-evident to me. In my efforts to bring JUGs around the country on board, I am learning that this is simply not the case. So, please read the full blog entry for my thoughts on this matter."

In today's Forums,signal3 points out that you can't kill the kill switch, in Re: How to Disable END(or)Hangup key in J2ME. "It's still worth noting, the buck has to stop somewhere... so there will be some mechanism that the application management system provides to send the SIGTERM/SIGKILL combination. Again, it's typically the end/hangup key (as you already noticed). Nokia states explicitly: "The MIDlet can be still closed from the list of open applications." This is why, for all practical purposes, I consider the answer to you question a resounding no."

ziesemer reports success getting Sun to post an updated source drop in Re: JDK 6 Source Code. "I then followed-up with Roger Yeung, who is the last person who I observed making updates on the jdk6 project. He just replied today that the jdk6u12 source w/ JRL license is now available! The links on the main have been corrected as well. Hopefully this is kept up-to-date now with future releases. Thank you Roger and anyone else that may have been involved in fixing this issue!"

Sahoo explains dependency injection limitations in the followupRe: Dependency injection problems. "You can't inject an EntityManager into an EntityListener. EntityListener is not managed by any of the containers. Ideally, the callback methods should have passed the persistence context in which the entity is being managed as an argument, but they don't. I have mentioned that as a feedback to JPA spec lead, but I am not sure if they incorporated the feedback or not. You can try the same."

Finally, samantha001 is looking for file transfer. "I am using sockets for transferring file but unable to transfer large files because of unreliable connection any one can tell me how can i make connection reliable. can i move to cms, file transfer is possible using cms on any type of network including private connection(using relay). If yes then how can i do this and plz tell me the limitations too."

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.

Behold the one-class project  

That's How You Know Blog

Posted by kfarnham Feb 18, 2009

Figuring out web services with JavaFX's I/O and data packages

OK, OK, lots of the JavaFX stuff out there has been about graphics and tooling, to say nothing of improvements to the underlying SE platform to improve deployment and graphics performance. But it's a safe bet that many of these JavaFX applications are going to have some sort of network presence: there are only so many self-contained apps you can write (calculators and reversi games, anyone?) before you're going to want to make your app a client to some kind of network service.

So how do you do this in the context of JavaFX. Of course, since you can call Java from JavaFX, there's always the option of going with the frameworks you've used before. But they don't necessarily suit the declarative nature of JavaFX code. As it turns out, JavaFX includes its own HTTP and XML parsing packages, and they suit JavaFX's event-driven programming idioms nicely. Here's an interesting snippet of parsing XML coming off an HTTP connection:

  onInput: function(is: InputStream) {
    try {              
      PullParser {
        input: is;
        onEvent: function (event : Event) {                     
                  // We handle the event
    finally {

From a Java point-of-view, that's probably completely alien, but take a step back and consider how concise this is: when you get data (onInput) on an input stream, throw it to an XML parser and get callbacks on parsing events. Maybe a little interesting as a new way to think about common client-side tasks?

Well, this block of code is from today's Feature Article, in which Francesco Azzola introduces JavaFX HTTP Networking and XML Parsing. In it, he walks through a basic example of reading data from an HTTP connection, parsing XML data, and the very common task of doing the two together. Combined, these tasks are the building blocks of all web service clients, and it's nice to see JavaFX offering an approach that suits its programming concepts and styles.

You've probably heard that JSR 292's support for dynamic languages proposes add a new Java bytecode,invokedynamic. But what does that mean, how does it work, and what good is it? In Java Today, John Rose offers an overview in the blog Simple Java Linkage: An invokedynamic Apértif. "For today, here is a light aperitif showing howinvokedynamic could be used to simulate the other invocation instructions. This of course is relatively useless as-is, but it is an apt demonstration that invokedynamic can be used as a building block for more complicated call sites that include the standard JVM invocation behaviors as special cases. (Caution: This blog post is for people who enjoy their bytecodes full strength and without mixers.)"

"Quality is indisputably the number-one requirement for any product or service. It's been rightly said that when you're out of quality, you're out of business. Superior quality, however, is never an accident and achieving it takes the concerted efforts of creative, competent, and dedicated professionals in both the development and testing arenas." In Perspectives on Quality Assurance for OpenDS, Gary Williams, lead test engineer for OpenDSshares ideas and experiences with testing open-source software, and OpenDS in particular.

Former blogger Chet Haase offers a Java-tinted introduction to Flash and Flex's programming language in ActionScript for Java developers, Part 1. "So while I'm not a language expert [...] I thought that it would be useful to take a step back from both languages and compare them from this programmer's point of view. I'll compare various aspects of the languages to see what ActionScript 3 looks like to a Java developer. In so doing, I hope to help you avoid some of the pitfalls and misconceptions I encountered in my own migration to the Flex SDK."

In today's Weblogs, James Gosling reports that he's At TechDays in Hyderabad. "I'll be spending this week at Tech Days in Hyderabad. It'll be a grand geekfest with lots of educational sessions. If you're anywhere near by, come join in. It promises to be a lot of fun."

John O'Conner complains that NetBeans 6.5 still coughs on spaces. "I've praised NetBeans 6.5 enough that my colleagues would probably adopt it as their IDE, but NetBeans still won't make it easy for us."

Finally, in Introducing Sun GlassFish


Another Believer Blog

Posted by kfarnham Feb 16, 2009

Impressed again by Zero

For such an unassuming name, Zero is a project with astounding potential. We've mentioned it before, because the potential of the project is exceptional: Zero is Java without the hand-porting of assembly code from one platform to another. That means Zero could be apt-get install openjdk on any architecture that has a C compiler.

Sure, you give up machine code and you give up speed. But the project also includes "Shark", a JIT that operates within the rapidly-evolving world of the Low-Level Virtual Machine (LLVM) project.

But let's be wary of premature optimization. Better to get things right. That's what's so remarkable about the announcement in Gary Benson's blog State of the world:

Well, in case you missed it, Zero passed the TCK! Specifically, the latest OpenJDK packages in Fedora 10 for 32- and 64-bit PowerPC passed the Java SE 6 TCK and are compatible with the Java SE 6 platform. I’ve been working toward this since sometime in November — the sharp-eyed amongst you may have noticed the steady stream of obscure fixes I’ve been committing — and the final 200 hour marathon finished at 5pm on FOSDEM Saturday, less than 24 hours before my talk.


Of course, all of this wasn’t just so I’d have something exciting to announce at FOSDEM. In a way it validates the decision we took at Red Hat to focus on Zero rather than using Cacao or another VM. By using as much OpenJDK code as possible — Zero builds are 99% HotSpot — we get as much OpenJDK goodness as possible, including the “correctness” of the code. Zero’s speed can make it a standing joke, but I’d like to use these passes to emphasize that Zero isn’t just a neat hack — it’s production quality code that hasn’t been optimized yet. I’ve written fast code and I’ve written correct code, and in my experience it’s easier in the long run to make correct code fast than it is to make fast code correct. The TCK isn’t everything, naturally, but the fact that it’spossible to pass it using Zero builds gives us a firm foundation for future work.

So what's next? Resumed work on Shark to get Zero running rightand fast... as perhaps upstream contributions from Zero to OpenJDK. Congratulations to Gary; this remains a fascinating project.

Also in Java Today, the Artima interview Sun's Jeet Kaul on JavaFX Mobile, features the vice president of Sun's client group talking about the relationship between JavaFX Mobile and Java ME, and how JavaFX Mobile enables consistent applications across mobile devices.

In the 31-minute video interview Deep Dive: JavaFX, An Interview With Jacob Lehrbaum, host Ed Ort is joined by Jacob Lehrbaum, the Senior Product Line Manager for JavaFX Marketing at Sun Microsystems, to demonstrate some of the exciting features in the platform.

In today's Weblogs, John O'Conner wonders Do we have a JavaFX Community site? "I know we have, but I wouldn't call that a community site really. You get all the JavaFX announcements, downloads, docs...sure that's important. However, I'm not sure that makes a community site."

Bruno Ghisi reports that Sun has fixed SBDTV Forum's messy with the new Java DTV specification. "After a lot of royalty issues in the Brazilian middleware Java subsystem (Ginga-J), Sun has helped SBDTV Forum and released Java DTV specification."

Finally, Cay Horstmann offers A Simple Servlet for Running JUnit in Glassfish. "When teaching unit testing in the context of an EJB3.1 application, I was looking for an easy way of testing managed beans and session beans inside Glassfish. I hit upon a scheme that I had not seen elsewhere: put the unit tests in the container and trigger them with a servlet that reports the outcomes. Here is the (very simple) setup."

In today's Forums,patrickjusseau is apparently thwarted by a recent JDIC change in jdic 0.9.5 libs already signed???. "I am trying to embed the jdic 0.9.5 jars in a program that I deploy using JWS. This is not working since the shipping 0.9.5 jars seem to be already signed. I have an ant build script that signs all the jar libraries I use in my program. Since there are 2 different sign certificates (the one I use and the one used by JDIC), JWS fails to launch properly on the client machine. So why are the 0.9.5 JDIC jars signed? The 0.9.4 jars were not signed and I am able to successfully use them."

cowwoc is frustrated by information about the Scene Graph project, in Re: Using SceneGraph in commercial application. "Why can't the scenegraph developers give a clear answer as to what is going on? Even stating that you're not allowed to discuss the license or roadmap would be more useful than the silence treatment I see in the mailing list archives. This is very reminiscent the way Sun dumped Java3D."

jimav asks for 6u14 secrets in Re: 64 bit plugin and compiz. "lucabotti, would you mind very briefly saying how and where you obtained the 6u14 amd64 firefox plugin? The usual mozilla plugin structure with is absent from the files installed by jdk-6u14-ea-bin-b01-linux-amd64-03_feb_2009.bin. I realize this question is off-topic, but since you apparently were able to test the amd64 plugin, you possess some key knowledge which does not yet exist in the browser-plugin documentation (which was written for 6u10 or before)."

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.

Impressed again by Zero  

I Thought I Lost You Blog

Posted by kfarnham Feb 15, 2009

Keeping nice little language changes in play

There's probably a class of developers for whom the most welcome change in JDK 7 will be the small language changes delivered by Project Coin. Eschewing the grand, world-changing concepts like annotations or generics (how the heck did both of those end up in the same release anyways?), Project Coin is looking for the small language changes that will make a lot of people happy without a lot of work. Examples that are clearly being considered as part of this package include the ability to use strings in switchstatements, and combining multiple exception types into onecatch. It's not hard to imagine the target audience here is the long-time Java developer who's been set in his or her ways since sometime around Java 1.4, and has been bugged by the absence of some of these for a long time... and who doesn't particularly want something like closures, because they're not necessarily interested in adopting a whole new programming paradigm (or thinks "if I'm going to try that, why not just try it on a different JVM language?").

In an update on where Project Coin is and what it's looking for, Joe Darcy has has posted slides from his JDK talks at FOSDEM 2009, in the blog FOSDEM 2009: OpenJDK 6 and Project Coin. "I was pleased to attend and speak at my first FOSDEM conference this year. The classroom setting of the Free Java Developer Room was certainly different than the cavernous session halls of JavaOne! My talks were on OpenJDK 6 and Project Coin." The slides are available as PDFs: OpenJDK 6: Where are we now? Where are we going? and Project Coin: Small Language Changes for JDK 7.

The Project Coin PDF is an important read for anyone with a favorite change they're longing for, as it illuminates the perhaps unappreciated costs of these changes, and emphasizes the criteria that will be used to evaluate potential changes: small in specification, implementation, and testing, yet still useful. Note, for example, that page 28 lists 162 feature requests... and page 29 shows just 7 of them being promising candidates for Project Coin.

Still, if you're a long-time Java developer, you might well have a little nitpick with the language that wouldn't be that difficult to set right in JDK 7. What do you think?

Also In Java Today, Kirill Grouchnikov announces a new animation library with a long history in Introducing Trident - animation library for Java applications. "Trident is the next evolutionary step of the animation layer that drives the animations in applications powered by Substance look-and-feel. The underlying animation engine has been in development and production use over the last two years, but the API was heavily oriented towards the UI delegates in custom look-and-feels. One of main goals of Trident is to preserve the power, performance and expressiveness of the existing animation engine, while at the same time providing a set of simpler APIs for use in application code."

"The first problem you encounter when trying to use NetBeans IDE to extend GlassFish is that GlassFish, while extendable (hurray), is only extendable via OSGi bundles. And NetBeans IDE doesn't let you create OSGi bundles. Or... doesn't it?" Geertjan Wielenga unveils NetBeans' new OSGI support in the Javalobby article Extending GlassFish v3 via the NetBeans Platform's OSGi Support. To try it out, read NetBeans and OSGi on the NetBeans Wiki, then excecute the Mercurial command hg Fabrizio Guiduichi also discusses Netigso in his blog NetBeans and OSGi

The recently-non-overloaded Joshua Marinacci appears again in today's Weblogs, with a blog Introducing the JFXStudio. "Today I'm pleased to announce a new experimental site a few of us have been working on called the JFXStudio. It's a site specifically for sharing your JavaFX creations. . The JFXStudio is not meant to be an app-of-the-day kind of site, or a showcase for polished apps. It's a place where you can show off your doodles and works in progress."

Speaking of JavaFX, Osvaldo Pinali Doederlein has been working with it and offers an early review in JavaFX 1.1 released, some first impressions. "Sun just made available JavaFX's first significant update, including JavaFX Mobile FCS (sort of - for developers, anyway). I did a quick check, some good news and some bad news..."

Finally, Markus Karg notes Release 1.0 of WebDAV Support for JAX-RS. "The WebDAV Project has just published the first binary release of "WebDAV Support for JAX-RS". Just two months after coding the first pieces, the team provided a library that fits nicely into the JAX-RS eco system and provides complete WebDAV 1.0 compatibility."

This week's Spotlightis on Duke's Choice Awards 2009, nominations for which are now being accepted. "Every year the world's biggest Java technology event, the JavaOne conference, culminates with the the Duke's Choice awards. The awards celebrate extreme innovation in the world of Java technology. They are granted to the best and most innovative projects using the Java platform. A global search is on to find the coolest Java technology innovations on the planet. Don't miss this opportunity to be recognized as one of the Java developer community elite at JavaOne, in San Francisco. The primary judging criteria for this prestigious award is innovation putting small developer shops on an equal footing with multi-national giants." The deadline for nomiations is March 27.

In today's Forums,ivan_g_s reports promising results with the next-generation garbage collector in Re: 6u14-b01 is available. "Wow! The new GC is really much better. Doing a certain benchmark to compare the old and new GCs, I really experienced that G1 doesn't "stop the world". I was testing an intepreter. It allocates a lot of short-lived objects, when testing recursions. I tested it several times as I couldn't believe my eyes. The benchmark results using G1 are so homogeneous (and also a lot faster)."

Apparently interested in the behavior of the current GC,demonduck follows up in the thread Re: Garbage collection and -verbose:gc give no garbage collection output. "I've read somewhere that it's best to write "dumb" code and not try to manage the JVM too much. I guess that is appropriate for me to do in my applet and not call System.gc() -- doesn't seem to do much anyway. I know stderr and stdout both go to the Java Console. I use them all the time. After all the work done on the new plugin and the new garbage collector and the emphasis for Java finally turning toward the desktop, it seem like sending gc messages to the Java console would be appropriate. You must be correct saying gc output is lost because I sure don't see any. That's too bad because it would be interesting to see."

arajmony reports Java types not getting created for certain Simple types in Metro. "While using XJC I see that it does not generate types for enums/simple types whose restriction is based on types like int,float,integer etc. But in case of "string" the java type gets generated. why is this descrepancy? Is there a way to force JAXB to generate java types for such enum/simple types as well."

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.

Keeping nice little language changes in play  

Time's Up Blog

Posted by kfarnham Feb 13, 2009

Waiting for Linux or EE to get usable? Stop.

Bad impressions are hard to shake. Every Java developer knows this, as the slightest mention of Java in public forums brings ignorant taunts about how slow Java was when some troll ran a Swing app on his 200 HMz Pentium back in the mid 90's.

Similarly, it's common wisdom that installing Linux is rife with danger, well beyond the skills of a typical human being, and only with at least kernel recompile do you have any chance of getting a bootable partition. Right?

Um, maybe not. In a development Cay Horstmann says is Long in coming..., his Linux installs have actually gotten boring:

I got a shiny new Thinkpad T500 for under $1,000, blew away Vista Homeless Edition, and installed Ubuntu Jaunty Alpha 4. I expected the usual fussing with wireless networks, display adapters, and futile fights to activate exotic peripherals. I was totally disappointed. Everything, and I mean everything, down to the webcam, worked after a 30 minute install with one reboot and no fussing. With an alpha release.

If this is the new reality, at least from Cay's point of view, then what other prejudices deserve a reconsideration? Well, maybe the idea that EE is a hopelessly baroque exercise in architecture astronomy:

My point is that some technologies undergo a relentless process of continuous improvement that ultimately pays off, and it is easy to be deceived by all the naysayers who were disappointed by a prior version. As we say in German:


On The Loose Blog

Posted by kfarnham Feb 12, 2009

JavaFX 1.1 hits the road

If you've visited the JavaFX home page and watched the videos there, you've probably noticed the graphic theme: a colorful ribbon that weaves through the outlines of a mobile phone, a television, and a desktop computer. The idea, of course, is to evoke the idea of "the screens of your life". Thing is, until today, JavaFX was a desktop technology, not one for the small device.

All that changes with the release of JavaFX 1.1, now available for download. This new version adds support for mobile devices, using the same SDK and API used for desktop and browser apps.

The launch page includes a video, itself a JavaFX applet, in which Sun VPs Eric Klein and Jeet Kaul discuss the opportunities and features of JavaFX Mobile and how it integrates with the established world of Java on the small device. Check out the release notes for other changes in 1.1, including stability and performance improvements, support for full screen mode, and language changes including the addition of all Java numeric types (float, double, long, int, short, and byte) to the type system.

To mark, the occasion, there's also a new Java Mobility Podcast. In Java Mobility Podcast 71: Eric Klein on Java FX for Mobile Devices , Eric Klein, VP of Java Marketing, tells you just about everything you want to know about the Java FX 1.1 release that is targeting mobile devices.

And speaking of podcasts, Episode 230of the Java Posse podcastis a JavaFX interview with Josh Marinacci, Jasper Potts, Richard Bair and Martin Brehovsky, recorded at Devoxx 2008. In it, the team talks about JavaFX's role as a new client-side Java stack, the choice of a new domain-specific language for JavaFX, why designers should take a look, how to prepare libraries and components for use with JavaFX, and more. A video of the interview is also available at

Even if you're not targeting mobile, this release looks like a solid step forward for JavaFX. Are you going to give it a shot?

Also in Java Today, Brad Wetmore has announced the rollout of the OpenJDK Bugzilla server. This means that OpenJDK contributions are now being tracked on the OpenJDK Bugzilla instance " The initial scope and goals of this phase are very limited: release a Bugzilla instance into the open and begin tracking patch contributions from developers without push access to the OpenJDK 6 and 7 forests. The primary goal of this phase is to further open our development processes, and prevent submissions from getting lost in the mailing list archives." Until later phases of this project are complete, new bug reports should still be submitted through the normal channels.

Osvaldo Pinali Doederlein sneaks a peek at the next rev of the "consumer JRE" in today's Weblogs. In Here comes JDK 6u14, he writes, "the first public, beta-quality build of JDK 6 Update 14 is available, introducing another batch of important enhancements for everyone..."

Carol McDonald checks in with an example for Building a Grails Pet Catalog using Netbeans 6.5 and MySQL. "This Sample app demonstrates the usage of Groovy and Grails to implement a sample Pet Catalog."

Finally, Tim Boudreau wonders Is programming...analysis done backward? "Ever stop to think how we do software? When analyzing the real world, people start with existing phenomena, then derive one or more models that describe it - each is an abstraction of one or more physical phenomenon. Occasionally someone starts with an intuition about how something ought to work, and it comes up correct. In software development, we start with the abstractions and the real world emerges. Is that a thing human beings have a lot of practice at?"

In today's Forums,happycamper wants to do a comparison of jaxb 2.0 versus xmlbeans. "I am in the process of considering a migration from xmlbean to jaxb2.0, but before I start (or go too far), i want to understand the differences, pros/cons, etc. I am interested in any research / articles / work done by the community in comparing the use of jaxb 2.0 versus xmlbean, particularly along the lines of speed / performance of marshalling / unmarshalling, support or lack of support of any xsd type/element definitions, any differences in mechanisms used in the binding (meaning does jaxb materialize java objects differently (more efficiently) than xmlbean based java objects), foot print (memory foot print, java class sizes), handling large payloads, 1M xml docs, other characteristics i may have missed"

pakmee points out a microemulator, potentially for use with LWUIT. "Hello guys, a while ago I used a an web-emulator(applet) that could run j2me code. Therefore, u could demonstrate your midlet online. It was only working with midp1 but lately I noticed that it currently runs midp2 stuff. So, lwuit should work on it. I actually had to fiddle around a lot with it to get it running but if anyone wants to use it , this is what I found..."

Finally, dmocek needs help with a Problem using remote interface so one enterprise app can access another. "I have an enterprise application which contains an EJB which implements a remote interface (@Remote annotation) and provides services to many applications. Let's call this AppA. I have another enterprise application with it's own EJB (AppB) which wants to call AppA. I'm using NetBeans 6.5 (but this shouldn't matter). AppB has AppA specified as a library so AppB can have access to the remote interface. As such, a copy of AppAEJB.jar is contains within the AppB.ear. When AppB is deployed, GF sees the AppA EJB and registers it with the global JNDI. When AppA is deployed, GF tries to register it with the global JNDI and see's something is already registered under that name. A conflict occurs and AppA fails to deploy. The real question is how to place AppA's remote interface into a shared library or project so the only thing AppB contains is the remote interface...and not the EJB."

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.

JavaFX 1.1 hits the road  

Perfectionist Blog

Posted by kfarnham Feb 11, 2009

Guarded optimism for JSR 299

JSR 299has been undergoing rapid-fire changes in the face of deadlines to get into Java EE 6 (which, as JSR 316, is up for a public review ballot next week). Just last month, it changed names from "Web Beans" to "Java Contexts and Dependency Injection", dropped the notion of being run inside anything other than EE, changed its packaging, and made a bunch of other changes.

It may still be something of a work in progress. Nevertheless, By a 14-0 vote with 2 abstentions, the JCP's SE/EE executive committee has approved it. However, the voting resultsindicate that several EC members still have some concerns. IBM voted yes with the comment:

IBM has serious reservations about introducing another competing component model into the EE platform when this JSR was supposed to be focused on integrating technologies into the platform. Aside from the duplication and confusion caused by this, the specification has expanded to cover a large spectrum of technology that is somewhat ambitious to fully define within a single specification. However, we acknowledge that the spec lead has made substantial progress in addressing feedback and therefore, we are willing to vote yes to allow the specification to move forward on the assumption that the spec lead will continue to address feedback and concerns.

Oracle and SAP AG both expressed concerns about integration with the rest of EE, with SAP commenting

There are a number of good concepts, but we are missing an overarching principle for a number of diverging goals that this JSR tries to address.

In our opinion, Web Beans would be a great addition to the Java EE platform, in both capabilities and ease-of-use, but only if its ideas are better aligned and integrated into the existing Java EE world.

We have communicated the details of our concerns to the Spec Lead. There is enough goodness that well justifies this JSR to proceed for now and we want to thank the Spec Lead for listening to our concerns.

All said, it's interesting that 299 got approved, rather than sent back for another spec revision. Surely that's a result of the looming vote on EE 6's container JSR. So what do you think? Is it OK to approve JSRs with implicit TODOs, or should the EC only approve JSRs once every "i" is dotted and every "t" crossed? Or are there bigger issues than that?

And finally, are you looking forward to 299, whatever its final name turns out to be?

Also in Java Today, Java ME developers will be interested in Danny Coward's comprehensive overview, Java ME: Reviewing Mobile Service Architecture 2. "The Mobile Service Architecture 2 (MSA 2) (defined in JSR 249) is the next generation of the Java ME platform for feature phones, following-on from the current MSA 1 (JSR 248) platform (which you can play with here). Given that MSA 2 is about to finish its public review, its time to take a look at it and some of the new APIs that it will add to the platform, so broadly adopted on mobile phones today."

Java deployments are often messy, error-prone, and manual, leading to delays in making software available to users. In Automation for the people: Deployment-automation patterns, Part 2, automation expert Paul Duvall expands on a collection of key patterns for developing a reliable, repeatable, and consistent deployment process capable of generating one-click deployments for Java applications

The recently-released SIP servlet proejct Sailfin 1.0 is the focus of several of today's Weblogs, beginning with Binod's SailFin V1: Step by step guide to get started. "SailFin V1 is released. This post explains the basic steps by which you can get started with SailFin V1."

Bhavani Shankar continues the Sailfin thread in SailFin : Develop your own applications using templates. "Writing a new test application in SailFin is made easy using the test templates. End users/developers can easily create & run some some test applications after installing the SailFin server. These test templates can also serve as a tutorial to develop different kinds of SIP servlet applications."

Finally, in Hudson is now a good-behaving Unix daemon, Kohsuke Kawaguchi demonstrates how "Hudson can now behave like a real Unix daemon."

In today's Forums,matormo notes a curious garbage collection behavior inYoung Collections taking longer than Full ones. "I have a high demanding application running under JDK 1.5.0_16, 64bits. The heap is set to 4G for the young and about 10G for the old generation. Survivor ratio is set to 8. Low pauses are more important than throughput for this application, so I'm using the CMS collector. In normal load, young collectios occur each 2 minutes and their pauses range from 500 ms to 1.2 seconds, usally around 0.8 seconds. Full collections take place each hour or hour and a half, with pauses of about 400 ms (just seen a very rare exception of 7 seconds!) Well, my question is, regardless of that 7 seconds pause exception, why I'm having YGC pauses longer than FGC ones?"

Sarah kho wonders what is status of glassfish v3? "Based on should be a milestone 2 available for download with almost all features? any news and scheduling to release the m2?"

timz is interested in Retrieving GlassFish settings in webapp. "Does anybody know if it is possible to retrieve the settings made in Glassfish (like serverName, userName and passWord), so that I can use it in my web app? Iknow it is possible to retrieve values form the persistence.xml file but we have allmost all settings in the GlassFish server."

Finally, midnightjava has a utility for Choosing JDK or JDIC System Tray implementation at run-time. "I've found it necessary to choose between the JDK and JDIC implementations of system tray functionality at run-time, depending on the version of the JVM in which my code is running. This is because there's a significant bug in the JDIC system tray implementation for Java 6 on Windows (see, and of course the JDK doesn't have system tray support prior to Java 6. I wrote some code that encapsulates this variability and enables a client to abstractly instantiate a system tray icon and make changes to its popup menu, without dealing with the two underlying implementations. The JDK implementation is chosen for Java 6 or later (for future compatibility), and the JDIC implementation is chosen for versions prior to Java 6." 

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.

Guarded optimism for JSR 299  

Scratching the Surface Blog

Posted by kfarnham Feb 10, 2009

Figuring out common tasks shouldn't be so hard

Tim Boudreau relates the story of a "Java newbie" who posted to the nbusers list the simple question "I want to put an image into an AWT frame. What component do I use?" Tim notes that it's easy enough to do by writing your own custom subclass ofCanvas to override paint() and draw the graphic. He also points out that there's a deeply non-intuitive one-line reply that uses Swing: new JLabel (new ImageIcon (ImagePanel.class.getResource("some_jpeg.jpg"))).

So what's the problem? Tim argues that the developer is led astray by misguided (or misguiding) documentation:

So I look at the docs for java.awt.Image. It says "The abstract class Image is the superclass of all classes that represent graphical images. The image must be obtained in a platform-specific manner." Well, that's not too useful... [not to mention wrong - or at least, misleading - is pretty platform independent, and so is Toolkit.loadImage()]. Hmm, I'll try the docs for BufferedImage, it's a subclass. Hey, that's better. It says "The BufferedImage subclass describes an Image with an accessible buffer of image data. A BufferedImage is comprised of a ColorModel and a Raster of image data." Hmm, nothing about reading or loading an image here. Where do I get one? I'll try Raster, that's its data, maybe that's where you load the data...

At this point I've gone down the rabbit hole - I'll spend at least a half hour digging through Rasters, ColorModels, ImageObservers and all sorts of other bric-a-brac that's useful if you're writing HotJava or Photoshop - when all I want to do is get my grubby little paws on an image!

In other words, while each class' documentation occupies itself only with the class in question -- components with how they're sized and laid out, images with how they're subclassed -- there's no natural place to tell the reader how they're supposed to put an image in an AWT component.

Reference documentation may be intended to be "reference" documentation - i.e. it talks about the thing the documentationrefers to. That doesn't mean it should talk about nothing else, like how to use the thing beingreferred to.

Having said that, is there a design problem for which the documentation is serving as a whipping boy? If it's so natural to want to put an image by itself in a component, and if so many users are going to have to write the simple ImagePanel class that Tim describes, then isn't it a failing of Swing to not provide that ability in the first place? Remember the old saw about making common tasks easy and uncommon tasks possible... maybe the underlying problem here is that it should be as easy to get an image into a Swing app as it is to get an image onto a web page. And it's not.

Also in today's Weblogs, Kohsuke Kawaguchi takes a look at a per-process transient /tmp mount. "This little tool for Linux allows you to isolate big tests that clutter the /tmp file system. The proess will get its /tmp upon launch, and when the process exits, all the temporary files it created are gone, too."

Marina Sum has a pointer for Building Drizzle on the OpenSolaris OS. She writes, "a few simple command lines and you're done."

In Java Today, Joe Darcy reports that the OpenJDK 6 Mercurial repositories are now available. "As announced by Kelly, after a successful trial the final read/write Mercurial repositories for OpenJDK 6 are now available. Thanks to Kelly for putting in the extra effort to create change sets approximating history information of the pre-Mercurial phase of OpenJDK 6! The build tags correspond to the state of the source code shipped with the indicated build."

Kirill Grouchnikov has announced the release of version 5.1 of the Substance look-and-feel. This version reworks the Office Blue and Office Silver skins, improves support for disabled, themed, and very large icons, extends tracing of EDT violations, and more (as detailed in the release notes). In a related announcement, he's also released version 4.0 of the Flamingo component suite, which adds an application menu / menu button / title bar, key tips, rich tooltips, numerous ribbon improvements (including scrolling shrinked ribbon content and visual groups in ribbon bands), and more.

Writing for the SDN, Bruce Hopkins argues for Three Reasons Why Your Next Java ME Mobile Application Should Include JavaFX Mobile. "Whether you're new to the Java Platform, Micro Edition (Java ME) or have been using it for a long time, right now is the perfect time to get started with JavaFX and JavaFX Mobile. The JavaFX 1.0 platform was released late last year, and it included several new capabilities and features that you may not be familiar with. The purpose of this article is to introduce you to the JavaFX platform, and to provide three really good reasons why your next Java ME mobile project should include JavaFX."

In today's Forums,mearl needs installation help, in Re: Installing phoneME on windows mobile 5. "The error I get is "There is not enough room to install my documents/uitest.jad (1090k is needed for installation.). Try removing other items to free up space." However when I look in windows memory screen I have 64MB free in program and 73MB free in storage. What space should I be freeing up? Do I need to define how much memory it can use in the .lnk file? If so what should parameters should I put in my .lnk file"

In another mobile message, HELP, how to disable JIT in cldc?, innowei writes, "I need to compare the performance between JIT enabled and JIT disabled cldc build. From the CLDC build guide I found that we need set ENABLE_COMPILER to false. While I got an linking error "undefined symbol fixed_interpreter_method_entry(referred from ROMImage.o)". Who else can help me to disable JIT of cldc? "

Finally, Eduardo Pelegri-Llopart announces Two Webinars this week: GlassFish v2.1 and GlassFish ASadmin. "This week we will have two webinars: in addition to our usual Thursday slot, we have added a Tuesday webinar to cover GFv2.1 which we didn't cover at launch time. Both Webinars share the same concall information."

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.

Figuring out common tasks shouldn't be so hard  

No Stranger Blog

Posted by kfarnham Feb 9, 2009

Keeping on your customers' radar

The last time I noticed a reference to Red Hat, it was in Forbes' list of the 25 fastest-growing U.S. tech companies, a list largely dominated by smaller start-up companies (since it's a lot easier to double your sales when they're small to begin with). So it was rather surprising to see a "Red Hat is a dinosaur" argument in today's blogs. But Tim Boudreau makes an interesting case, arguing that A technology company without a consumer strategy doesn't have a strategy by criticizing Red Hat's focus on the enterprise:

Well, at some point, I don't actually remember when, RedHat decided that this whole business of doing a consumer OS was costing a more than it returned. The money was in theenterprise. So eventually the whole consumer OS piece of it got sort of spun off into this Fedora-somethingorother thing (don't get me started about product naming), and progressively lost steam, but who cares - because they're at warp speed on the enterprise.

So what's the problem? Enterprise is where the big, clueless, pointy-haired boss money is, right? Why wouldn't you want to be there, and only there? Tim's argument -- and he makes an analogy to Sun and its workstation business -- is that the non-enterprise parts of your business are a "calling card" to your future customers:

There's just one problem with that whole "core competency" disease: Those unprofitable workstations were your marketing channel. They were your way to show the world that you do good engineering - to show that to the people who would be the decision makers at all those dot-coms to-be. To think the people who are deciding to buy your stuff today will be the buyers of tomorrow - that you've got a "permanent majority" isn't even the height of hubris, it's the height of stupidity. You can't even call it self-serving behavior because it's not even that! At best it's a malignant form of laziness.

Do you buy the argument? And is there an analogy here to Java, which is so strong on the server, and making a new advance on the desktop in the form of JavaFX?

Also in today's Weblogs, Fabrizio Giudici notes An interesting debate about JPA and the DAO. "To sum up their positions, Adam is saying that the EntityManager in JPA, used from the service layer, can replace the DAO pattern at the point that it may disappear in most cases; Scot is arguing that he doesn't like to mix his first-class objects (derived from the domain model) with things related to JPA, so the DAO or something similar is still needed."

And Carol McDonald shows off her JavaFX RESTful Pet Catalog Client, "a JavaFX application that displays pet photos retrieved from a RESTful Pet Catalog app."

In this week's Spotlight, the JCP has announced the beginning of the special election to fill a vacated seat on the Mobile Edition JCP Executive Committee. "The nomination phase will continue until 17 February 2009. This Micro Edition EC seat is for a term ending in December 2010, and will fill Intel's vacated seat on the Java ME EC." Instructions for nominating yourself or another candidate are on the JCP home page, as is a description of EC member duties. The election will take place between February 24 and March 9.

In Java Today, Jim Driscoll has announced the second revision of Project Mojarra's JSF 2.0 PR implementation. Binaries and source are available for manual download, and should be available in the GlassFish Update Center today. Jim writes, "we're very proud of the number of bugs fixed in this release, so if you're already using JSF 2.0, by all means check it out. We're still some time from being Beta quality however, so this release remains useful only to people who are early adopters."

As promised last week, OpenDS 1.2 is now available (download, changelog). Ludo Champenois has an Overview of the New Features which includes a new GUI for server and data administration, improved security, manageability and performance.

The latest edition, issue 190, of the JavaTools Community Newsletter is out, with tool-related news from around the web, new projects in the community and a graudation (JRecordBind), and a Tool Tip on converting special characters to the unicode escape sequence.

The debate over 6u10's Quick Starter behavior continues in theForums. In Re: Java Quick Starter IO activity question, fizixwrites, "sure, there is a check box that supposedly turns off jqs, but it only does so for, at most, a day. i've tried turning off the java update manager as well, but for whatever reason, jqs materializes after some short period of time AND the check box is marked again. Now, the only option i'm left with is disabling the service - and that's just not an acceptable recourse, especially when there is a setting in the more obvious java app itself. a more typical user wouldn't know what to do other than uninstall."

keithrz would like to Prohibit JRE from accessing network files. "I'm wondering if there are any JRE settings, policies, or permissions I can set in a JRE installation that will prevent all applets running in the JRE, including signed applets, from accessing network files and drives. In my particular example, I am running Windows XP sp2. I do not want my JRE able to read files in file paths like \\foo\bar, or Z:\, which maps to \\baz\."

Finally, JXTA user cyberdyne_indiya needs advice for creating new shell commands. "I am trying to develop new shell commands for the jxta shell. Is there any possibility of using the existing shell commands to create new one as they save a lot of development work. I saw in the documentation of ShellApp class, which every new command has to inherit , a method called exec to execute existing commands. Are my assumptions correct?"

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.

Keeping on your customers' radar  

Listed MIA Blog

Posted by kfarnham Feb 6, 2009

JavaFX goes mobile... without "JavaFX Mobile"

A year and a half ago, James Gosling pointed outthat increasingly-powerful mobile devices meant that things were converging on SE, a point that led to a bunch of "ME is dead" misinterpretations that he then needed to correct.

In a sense, we're seeing the same thing play out in JavaFX. Initially, "JavaFX Mobile" was announced as a separate platform, but as Joshua Marinacci reports (in his first blog in ages), There is no JavaFX Mobile. There is only JavaFX.

When you write JavaFX desktop apps with the common profile you are also writing for mobile devices. Desktop and mobile aren't different platforms. There is only one JavaFX. Even though there is no mobile emulator for Mac, I've done all of my mobile samples work on my Mac. I write my desktop apps to support window resizing, resize to the approximate size of a mobile device, then save my code. I only switch to Windows every now and then for a quick test in the real emulator. As long as I only use the common profile everything just works.

It struck me this morning how much of a big deal this is. I don't know anything about Java ME, but I know JavaFX. Even though I'm not a mobile developer I can write mobile apps with JavaFX. I couldn't do that before. One SDK, one set of tools, one language, one set of APIs. There is no JavaFX Mobile. There is only JavaFX.

So, if someone asks you "desktop or mobile", JavaFX developers can now just say "sure!"

Also in today's Weblogs. Fabrizio Giudici wonders about Dropping support for Java 5? "So, I'm about to decide to drop support for Java 5. This means I'm losing most of potential users on Mac OS X. On the other side of the coin, the saved time would contribute in having more regular releases (I haven't made an official release of blueMarine for more than one year - without them I'm probably losing all the potential users)."

Finally, Xuan Yun shows off Style Binding in Synth Look And Feel. "The style binding mechanism is another great feature of Synth look and feel. By using it, we can define several styles for same kind of swing component."

The latest Java Mobility Podcast is Java Mobility Podcast 70: Bit-side , in which Thomas Sch


Salvation Blog

Posted by kfarnham Feb 5, 2009

The future of Swing in JDK 7

A few days back, we noted Jonathan Giles call for a Swing 2.0that would primarily focus on cleaning up relics and anti-patterns in the decade-old GUI toolkit. Of course, we weren't the first or only ones to link to Jonathan's blog, and the discussion has prompted Danny Coward to put out an official statement on where Sun sees Swing going in the future.

Over at The Planetarium, in Swing and JDK 7. He begins by assessing Swing's value and its needs:

In contrast to the early years of hectic build out of Swing, we've slowed the growth of APIs over the last few years. This is largely because, despite gaps in the API set for some applications, compared with those early days (or with JavaFX today), the Swing APIs are broad enough to build most of enterprise desktop applications. And that which is not there can most often be added with a third party library or component.


So our focus has been shifting (starting well before the advent of JavaFX, even of Java SE 6) from filling out what were then major gaps in Swing as a UI toolkit, to making it easier to develop with the Swing, and to making the runtime deploy and perform better. Progress on both counts are a benefit to Swing developers but also to other technologies that depend on Swing and its foundation.

So what does this mean? Danny argues that most of these improvements to Swing are actually being provided outside of its APIs: JDK 6u10 improves deployment and performance, with Project Jigsaw offering modularity and the separate Swing Application Framework eliminating boilerplate in creating Swing apps.

And as for Jonathan's arguments for cleaning up the Swing APIs with enums, collections, generics, and other language improvements made over the years, Danny says Sun's way forward will be far less ambitious:

We have a more conservative attitude towards breaking backwards compatibility than some of the commenters on the thread (and beyond): an attitude formed out of years of talking with developers and customers who depend on Swing. (As an aside, you may be curious as to the inherent design issues regarding the EDT).

However, having said that, he notes that modularizing the JDK may eventually offer a clean path to introducing backwards-incompatible changes in Swing, and asks interested parties with plans for bigger changes to engage them via OpenJDK.

So, now, are we even talking about a "Swing 2.0" anymore, and if so, what is it? Is Swing running in a modular JDK with hardware-accelerated graphics and draggable applets fundamentally different than the environment we've been writing Swing apps in for all these years? Would a Swing 2.0 that makes incompatible changes and cleans up the APIs, a la Jonathan's suggestions and without adding any new GUI components, be something to rally around? And is there anyone seriously proposing new components for Swing, or is that now exclusively the responsibility of third-party add-on libraries?

Having mentioned Project Jigsaw, we also note in the Java Today section that the OpenJDK community has approved and launched Project Jigsaw, which was announced by Mark Reinhold back in December. "The goal of this Project is to design and implement a simple, low-level module system focused narrowly upon the goal of modularizing the JDK, and to apply that system to the JDK itself. We expect the resulting module system to be useful to developers for their own code, and it will be fully supported by Sun for that purpose."

The 7th Annual Duke's Choice Awards are now accepting nominations. "Every year the world's biggest Java technology event, the JavaOne conference, culminates with the the Duke's Choice awards. The awards celebrate extreme innovation in the world of Java technology. They are granted to the best and most innovative projects using the Java platform. A global search is on to find the coolest Java technology innovations on the planet. Don't miss this opportunity to be recognized as one of the Java developer community elite at JavaOne, in San Francisco."

In today's Weblogs, Sebastien Dionne looks at PHP on Grizzly with JSR223. "This time I will show you how to run PHP applications on GrizzlyWebServer using 100% pure java solutions. I used Caucho Quercus to handle the PHP and GrizzlyWebServer as my WebServer."

Ed Burns shows you how to Format issue tracker issues using XSLT, providing the code from a winner of a contest for "using an XSTL style sheet to format issue tracker issues."

Oh, this is interesting: A university research confirms the popularity of Hudson. Kohsuke Kawaguchi reports that "a university research reveals a rather interesting picture of the current CI tool adoption landscape."

In today's Forums,captainvoid asks about the title attribute in "option" element (f:selectItem). "Just wondering why there's no way to set the title attribute of an "option" element (inside of a select). Nobody needs it? It adds a very useful tooltip to the option element which is difficult to achieve otherwise.. I couldn't even find it in the 2.0 release."

smjack70 has posted a Quick stupid SAX question from someone returning to Sweet Mother Java, which doesn't seem "stupid" at all. "My question is: what are the common ways of dealing with streaming XML, where the entire document isn't fully formed as it's being parsed (and may never be fully formed, if the stream never ends). The approach I'm taking right now is a SAX parser, with a handler that's taking the parsed elements and building a data structure out of the output. Basic stuff. The problem I run into is when I'm trying to parse a streaming file: the file EOF keeps causing the parser to throw an malformed xml exception, due to the fact that the xml stream isn't done."

Ryan de Laplante warns of JDBC hazards in Re: FW: Vista, Jee5, sql2000 &sql2005. "I do not recommend using Microsoft's JDBC driver. When we use it in production to communicate with a remote SQL Server 2005 EE, at least once per week there is a problem trying to connect to the database. The Microsoft driver blocks the thread that is asking for a connection indefinitely. Looking at the FINE/FINER logs, it shows "TDS prelogin response error". Once this happens 5 times then the HTTP Listener for your web application can no longer respond to web requests and it looks like GlassFish is locked up. This happens even when you set the loginTimeout property. We tested the latest 1.2 version of the driver."

ipsi complains of Trouble creating Webservice from existing WSDL. "Here's my problem: I have an existing, reasonably large, project. It's recently been migrated to Glassfish, which went very well, and had no major problems. That was good. One of the things I need to do, now that it's been migrated, is to build a web service for it. The way we did this was build the WSDL first to get agreement on it with the client and such, then started coding it. This is where my problems start. For the record, I'm using Eclipse Ganymede (not switching to Netbeans, so NB instructions aren't going to be much use), and Glassfish V2 UR2. I was able to get the web service working as a servlet, sort of, but Glassfish wasn't recognising it as a web service, so now I'm trying to get it working in such a fashion that Glassfish will recognise it, and it will be visible under the Webservices menu in the Glassfish admin page."

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 future of Swing in JDK 7  

Start Now Blog

Posted by kfarnham Feb 4, 2009

JCP special election nominations

The JCP has announced the beginning of the special election to fill a vacated seat on the Mobile Edition JCP Executive Committee:

The nomination phase will continue until 17 February 2009. This Micro Edition EC seat is for a term ending in December 2010, and will fill Intel's vacated seat on the Java ME EC.

If you are a JCP member, you can nominate your candidate by sending an email to

This is your opportunity to get involved. Check this link for a description of EC duties.

Please contact the PMO with any questions concerning nomination preparation. As in the annual EC Elections, these will be self-nominations, open to JCP program members only. Click hereif you would like to join the JCP program.

The election will take place between February 24 and March 9. Good luck to all the would-be nominees.

Also in Java Today, The Aquarium announces a Feb 5th Webinar - XWiki and GlassFish: "This week's webinar is the first of a new, occasional, GlassFish Partner Series. This week's webinar is on Thursday, Feb 5th, 11 am PT. Vincent Massol will provide an overview of XWiki, the java-based, OpenSource Wiki and collaboration platform. XWiki is supported on GlassFish and is used in currikiand in the new (in progress) Site. I've asked Vincent to also include a comparison with Atlassian Confluence, as that's what it is currently being used inWikis.Sun.Com. Time permitting we will also discuss Vincent's experience embedding GFv3 into XWiki, and Alexis would join us for that segment."

Project Grizzly, the NIO-powered server framework, has just released version 1.9.5. Jean-Francois Arcand summarizes the major improvements in a new blog, which include a concurrent CometHandler, a reflector CometHandler,. an improved GrizzlyWebServer, an improved Java API, performance improvements, an OSGi bundle, and more (see the complete issue list).

Osvaldo Pinali Doederlein takes a look at the the 6u12 update in today's Weblogs. InSun JDK 6u12 released, good for both Swing and JavaFX, he writes, "whether you are a Swing diehard or a JavaFX enthusiast, Sun's latest JRE is yet another important improvement for client-side Java."

Marc Hadley introduces a Draft WADL Update. "Its been just over two years since the last version of WADL was published and, in the intervening time, a number of issues have accumulated. I've held off making regular updates for reasons of stability but I think there's sufficient backlog now to require a new version."

Finally, wrapping up this year's conference, Terrence Barr posts a M3DD: Thanks & follow-up. "I'm just coming up for air again ... M3DD took all my attention for the past three weeks and after it was done I had a bunch of things to follow-up on, sift through hundreds of piled-up emails, and finally take two days off for a desperately-needed break. Late, but anyway, I wanted to share a brief follow-up on M3DD:"

In today's Forums,jjjaime reports success Using OSGi in phoneME Advanced. "We have successfully deployed an OSGi r4 framework on top of phoneME Advance in a Windows Mobile device. We


Life Won't Wait Blog

Posted by kfarnham Feb 3, 2009

The Java Plug-In Goes 64-bit

One of the top RFEs is gone from the Bug Parade, not because people changed their votes, but because it got implemented. I'm talking, of course, about the call for a 64-bit version of the Java plug in.

Danny Coward notes the arrival of this long-awaited feature in the Upgrade to Java SE 6u12.

"Normally one bug getting fixed doesn't make for a party, but many people (way more than the 803 that voted for it in the bug parade) have waited for some time for this one: support for the browser plugin for Java on 64 bit OSs. So now the Java Plugin for 64bit Linux and Windows is part of the recently shipped Java SE 6 Update 12."

Now if we only had a 32-bit version of the Java 6 Plug-In for the Mac. Just teasing...

Also Java Today, Lillian Angel notes new features in IcedTea, the OpenJDK port with encumbrances replaced by code from GNU Classpath, in her blog IcedTea6 1.4 Released! Along with updating to the OpenJDK b14 build, IcedTea also updates to the new new OpenJDK7 Hotspot 14. "The old OpenJDK6 Hotspot 11 can still be configured -- with-hotspot-build=original -- but future versions will drop support for the old version and only support HS14. Zero and Shark have been forward ported to HS14 (from HS12)." Another improvement is XRender pipeline support: "Java2D are noticably faster and running over a remote X connection feels like it is all local."

Are you a portable DJ? The latest Mobility Tech Tip from the SDN looks at Mixing MIDI, Tone, and Sampled Audio using MMAPI. Author Vikram Goyal writes, "on the face of it, mixing sounds in a mobile applications is a desirable attribute to have, especially for multimedia-rich applications like games. MMAPI provides you the ability to mix different media, but there are pitfalls. The following sections describe some of these issues."

Today's Weblogsbegin with Tomas Brandalik showing you how to do Hot deployment into emulator. "Java ME SDK has an important feature which can speed up MIDlet development. MIDlet can be redeployed into already opened emulator."

Fabrizio Giudici explains why blueMarine went Semantic. "This is just an introductory post of a series that will illustrate why and how I integrated this stuff in blueMarine. Don't expect a tutorial about the semantic web itself, rather - as usual for me - an architectural perspective about a tool and why it's good/bad."

Finally, Cay Horstmann seeks a path Towards Java EE Nirvana. "Java EE 6 makes it pretty straightforward to crunch out a basic web + database application. This semester, my software engineering class is building web apps, and I decided it is simpler to have them use JSF + JPA in Glassfish v3 rather than some technology that seems easy at first and then lets them down. In this blog, I describe the recent simplifications, show how to set up Glassfish, give a sample app, and explain why we haven't quite reached Nirvana."

In today's Forums,kram explores CSS and Controls in JavaFX. "I have been learning about the CSS part of JavaFX, which seems like a great idea, but Im just wondering something. If I have a custom control, which extends CustomNode, that, in the create() method returns a Group of nodes, such as a heap of different lines, and rectangles etc... How would I apply a CSS style to an internal node of that group (i.e. one of those internal rectangles)? I cant seem to get it to work just using the styleClass properties, although maybe my CSS declarations are wrong, anyone had any experience with this?"

mimreza_sh doesn't seem to know where to begin writing a graphing math function. "hi everyone , I am a student and i am trying to develop a "graphical scientific calculator for mobile devices " , i have problem with the graphing part . the calculator supposed to sketch math function's graphs eg (sin(x),cos(2x),etc) , is there any specific library for this matter or i should generate the code myself . can u help me by introducing any sources??"

arishapiro points out the roadblock to ME development in another followup to the thread Re: Do you guys agree that J2ME is dying?. "You have to understand that this is beyond the control of Sun. If AT&T decides that they will only allow signed applications on their devices there is nothing that Sun can do about it. For better or for worse the operators control what they allow on their devices not Sun."

Finally, newcomer4 needs to create a jar.exe package without JDK. "I am building a commercial application using Java technology. At the client side only JRE is required But my application at the time of installation also need to update an existing jar file at runtime. For this I need to use jar.exe file. I am having JDK installed on my machine. Client side installation doesn't require JDK Can I package this jar.exe with my application without the need to install JDK at the client side?"

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 Java Plug-In Goes 64-bit  

Roots Radical Blog

Posted by kfarnham Feb 2, 2009

Calling for a Swing cleanup

A number of Java blogs and news sites are linking to Jonathan Giles' Java Swing 2.0 blog:

I believe that there is a need for a proper Swing 2.0 which is not JavaFX-based, but a true, desktop focused, Java (the language)-based framework. My vision is one shared by numerous others, and in a brief discussion (via twitter no-less), a number of us enumerated what we believe a Swing 2.0 needs. The following list is a brief overview of what Swing 2.0 should be...

The interesting thing about Jonathan's list is that it's all about the plumbing: support for enumerations and varargs where appropriate, smarter use of collections, generics-based, and enforcing the event-dispatch thread rules. There's nothing in here that you'd actually see onscreen in a Swing 2.0. Jonathan writes, "What you may note is missing is any mention of new components, new Look and Feels, etc. That is not my interest - in my opinion Swing 2.0 is a cleanup of the code beneath the existing Swing components."

It's interesting to note that Jonathan's bio lists him as being 24 years old... since Swing came out back in 1998 -- when he would have been, what, 14? -- it's entirely possible that he only came to Swing much later in its lifetime. And with fresh eyes and without baggage or preconceptions, the Swing design decisions of 10 years ago may not hold up anymore. I mean, after all, public JList(Vector<?> listData)... seriously?

So what do you think? Rework Swing's plumbing before we even talk about adding tree-tables, cover flows, image pickers and other modern components? Or are we to give up on Swing and look to JavaFX as the reboot of the Java GUI?

Also in Java Today, PointLayout is a new layout manager designed to make the GUI development process simpler and more inuitive. It is one of the few gridless layout managers available. By being gridless, it offers a lot more control for a lot less code. Project owner Ryan Williams writes, " While my initial design is mostly complete - I would like to know what the Java community thinks of it. Is it easy to use? Is it powerful enough to meet all of your GUI development needs? What features would you like to see added? Are there any bugs? I want this to become a powerful (and hopefully well known) alternative to the other layout managers out there."

Brad Wetmore has posted an Update on the OpenJDK Bugzilla instance. "I've recently been leading the effort to get our OpenJDK Bugzilla instance in place, and just wanted to let folks know that we're pretty close. I took some time over the last couple days to take a snapshot of what we have and what's planned for the near and somewhat longer future. The short story is that we'll begin by tracking contributions from OpenJDK developers who do not have push rights to the JDK 6 and 7 forests. The next phase will expand the system to track most if not all of the OpenJDK projects under development. The longer story is now available on the OpenJDK website."

In today's Weblogs, Jim Driscoll cleans up his component logic in JSF 2.0: A Component's Controller. "After my last blog post on composite components, Ed Burns, the spec lead, pointed out a better way to do things, by using a controller for the component. Here's a short explanation of what to do to make that work."

Kohsuke Kawaguchi explains the process of Writing a Unix daemon in Java with Akuma. "Writing a proper Unix daemon in Java used to be very difficult, due to the lack of access to the OS capabilities from Java. So I wrote a library to overcome this problem."

Finally, in Pack and Deliver Synth Based Look And Feel, Xuan Yun will "Introduce how to pack Synth based look and feel as a JAR file. "

This week's Spotlightis on the OpenSSO community's newly-announced conference, OpenSSO Community Day, to be held March 17 at the NYU Kimmel Center in New York, the day before CommunityOne East. "Hosted by New York University and sponsored by Sun Microsystems, this is an opportunity for OpenSSO contributors, deployers and users to come together in an informal 'unconference' setting. Being an unconference, the only rigid item on the agenda is to decide at 9am on the sessions for the rest of the day. You can show up and talk about any OpenSSO-related topic you like. [...] All are welcome, attendance is free, and continental breakfast plus lunch will be provided."

In today's Forums,tck asks about JOGL renderer and getPreferredConfiguration() delays. "I've been experimenting with Java3D 1.5.2 and the jogl renderer (JOGL 1.1.1). Things look great with the exception of a significant pause with the *first* call to SimpleUniverse.getPreferredConfiguation(). I am seeing delays on the order of 15+ seconds for the call to return. This delay is not observed with the d3d or ogl renderers (at least of the same magnitude). [...] Is there a way to minimized this delay?"

Dobes Vandermeer is considering different strategies for Using JMS. "Is it expensive to create a JMS connection, session, and sender each time I send a message, or should I do some extra work to make these reusable? I was trying to reuse them before but I ran into problems - for example, changing the parameters of the connection factory from the admin interface invalidated the connection objects I had."

drdth continues the contentious thread Re: Do you guys agree that J2ME is dying? with a complaint about ME fragmentation. "IMHO the biggest thread to JME isn't Apple but Sun itself. If they had used their efforts to govern towards a consistent JVM and deployment process across vendors, instead of constructing a painful code signature nightmare for developers, then the open source community could enter the JME market and applications would run closer to 'everywhere'."

Sarah kho asks what happens when glassfish starts in profile mode? "Can someone please let me know what happens when we start the glassfish in profile mode, is there some asadmin command to start the application server in profile mode or it is just netbeans ide that can do this?"

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.

Calling for a Swing cleanup  

Filter Blog

By date: