Recent Blog Posts
Blogs ยป Java EE
The Daily Grind
: Java EE BlogDWR is AJAX for Java
Java and JavaScript. Such similar names, but the technologies they refer to are worlds apart… or at least they were until now.
The technique of remote scripting enables JavaScript code running in a Web browser to do things on the Web server and display the results without loading a new Web page. When the results sent by the Web server are in XML format, the technique is called AJAX.
The newly-released Direct Web Remoting (DWR) library greatly simplifies AJAX with Java Web applications.

The library takes all the drudgery out of remote scripting with a Java Web application, but it does require that you know what you’re doing. Beginners in either JavaScript or Java are likely to have a tough time.
You must add a JAR file to your Web application on the server, set up a special servlet to handle the script requests, and then configure one or more classes that you wish to make available from JavaScript. The configuration is done with a nice, clean XML file, where you can specify how each class is instantiated (per request, per session, etc.).
On the client side, you have to include the general DWR JavaScript library as well as the JavaScript code …
Java 5 available for Mac OS X
Also on the Java release front, Apple has finally released Java 5.0 for Mac OS X. You’ll need to first upgrade to Mac OS X 10.4 (Tiger) to get this–previous versions of the operating system need not apply.
Apple is taking a cautious approach to the rollout of Java 5.0 for Mac. This first release of the new platform does not replace the default version of Java (1.4.2) on the system, but rather installs alongside it.
By default, therefore, Java 5.0 will only be used by Java programs bundled as Mac applications that contain an Info.plist file that specify a JVMVersion of 1.5+ or 1.5*.
Alternatively, users may configure Java 5.0 to be the default version of Java on the system using the new Java Preferences utility included with the update.
In short, this means that if your Java application requires features of Java 5.0, then to run it on Mac OS X you’ll either need to bundle it as a Mac application and provide instructions for users who haven’t installed the update, or you’ll have to ask your users to modify the default Java version in use on their system. Neither option is particularly feasible.
For now, take this opportunity …
Java 5 1.5.0_03 released
I wish Sun would announce new Java releases someplace. Release dates in the documentation would be nice too…
In any case, Java 5.0 version 1.5.0_03 is now available for download. Among the amusingly catastrophic-sounding bugs listed as fixed in the release notes:
Bug 6173972: backspace, arrow keys, and return key not working in java applications
Handy to have that fixed…
Java 6 ‘Mustang’ New Desktop Features Announced
A bit slow off the mark on this one, but an Australian long weekend will do that, I guess. Sun has published an article detailing the new desktop features it is working on for the next major release of Java, codenamed “Mustang”.
As with the publicly available snapshot builds, Sun is adopting an “open and honest” policy with this article, explaining what it hopes to include in Java 6.0–not necessarily what it can guarantee will be in it. Some features may be dropped if they are infeasible or will take too long to make the 6.0 release (as the shared VM was for Java 5.0).
Some of the highlights for me:
- True double buffering
No more “grey window” when switching to a Java application/applet that has been in the background for awhile. - Native Windows and GTK Look and Feel rendering
Will use the native operating system’s APIs for rendering user interface components where possible to match perfectly the look of native apps. - Font anti-aliasing (including LCD subpixel rendering)
Will respect the settings of the native OS to produce text rendering on par with ClearType on Windows. - Full support for Firefox
As opposed to simply supporting Mozilla, as is the case now.
Previously: Get your Java 6.0 builds …
JBuilder to emulate WebSphere
Borland JBuilder is to join IBM WebSphere in becoming a Java development environment built out of proprietary extensions to the open source Eclipse IDE.
As I reported previously, Borland will be porting some of the unique core features of its JBuilder IDE to Eclipse, essentially making a free and open source version of JBuilder available for the first time. Until today, the question of what happened to JBuilder as a commercial product was up in the air.
According to The Register, Borland will keep selling an extended Enterprise version of JBuilder as a commercial product, but it will also provide commercial support services for the open source JBuilder components, in much the same way as IBM sells its Eclipse-based WebSphere development environment.
Exactly which features will be open source and which features will remain commercial remains to be seen, but I’d expect everything currently available in the free JBuilder 2005 Foundation edition to move to Eclipse and the Developer and Enterprise editions to remain commercial.
In such a scenario, the biggest change would be for current JBuilder users, who would have to adapt to the Eclipse environment. The functional limitations of the free edition would be pretty much the same as …
Mac OS X 10.3.9 update breaks Java
Long hailed as the only OS vendor to provide Java built in, Apple stumbled yesterday in the eyes of Java developers with the release of Mac OS X 10.3.9, the latest update to the “Panther” version of the operating system.
The update causes Java to crash with a segmentation fault error whenever it is started. Visiting a website containing a Java applet in Safari 1.3, the new browser version that is a part of the update, will cause the browser to crash.
Oops.
The solution to this problem is to first ensure that you have the Java 1.4.2 Update 2 installed on your system. If you’ve kept up-to-date with your software updates, you will. Next, you need to manually download and (re)install Security Update 2005-002 for Mac OS X.
These steps are detailed in a support article at apple.com.
O’Reilly Launches CodeZoo
O’Reilly has just launched CodeZoo, a new site to catalogue, distribute, rate, and offer tips for free software components. The site has been launched with a catalogue of free Java components, but O’Reilly is seeking feedback about what other languages/platforms should be featured.
Visitors to the site can submit tips and reviews of any of the components listed, or suggest components to be reviewed by O’Reilly staff for inclusion in the directory. The site provides Atom feeds for each of the components in its catalogue so that you can keep up with tips and new releases posted by the community.
I’ll be interested to see how this site evolves. At the moment, it’s a bit underwhelming, but if O’Reilly manages to attract a decent community by setting high editorial standards and offering more ways to keep up-to-date on the latest free software components, it could be a winner.
Java for Mobile Phones: The Next Generation
The Java Community Process (JCP) has approved initial plans to develop the Mobile Information Device Profile 3.0 (MIDP3), a new version of the standard that regulates Java applications and games on mobile phones.
Though the standard is still at the very earliest stages of development, the Java Specification Request that has been approved offers a glimpse of the new features that will be coming to the platform:
- running multiple MIDlets (mobile applications) at once
- running MIDlets in the background
- auto-launching MIDlets at device startup
- multi-screen and large display support
- more expressive and customizable user interfaces
- richer and higher performance games
A public review period of the finished spec is scheduled for January 2006, with the final spec to be approved in May 2006. I’d expect MIDP3 phones to hit the market en masse around Q1 2007.
In the meantime, MIDP2 is not a bad platform to play with. I’ve been doing some work with it myself in my spare time, porting an open source game written for Nokia S60 v1 handsets (7650/3650) to the MIDP2 standard supported by all major manufacturers.
A Shared Virtual Machine at Last?
Via TheServerSide.com, an article on java.sun.com discusses Project Barcelona, Sun’s research effort to implement a Multi-Tasking Virtual Machine (MVM). If successful, Barcelona will enable multiple desktop programs or Web applications written in Java to share the same Virtual Machine (VM). To each program, it will seem like it has the VM all to itself.
Up to and including Java 2 Standard Editon (J2SE) version 1.4, each Java program launched would load a new copy of the Java runtime environment (the VM) and the core Java classes into memory. J2SE 5.0 improved this situation somewhat by sharing a single copy of the core Java classes between all loaded VMs, but the resources used by those separate VMs still add up.
Many developers hope to see Mustang (the code name for Java 6.0, currently under development) take this the rest of the way and share a single VM between all active Java applications, though it may be more realistic to expect this in Java 7.0. To make this happen without breaking a lot of existing Java apps, Sun will need to share the VM without letting the apps step on each other’s toes. That’s what Barcelona is all about.
Here’s what …
Signs JBuilder is on the way out
Eclipse, the emerging de facto standard in Java IDEs, is everywhere at the moment, with EclipseCon 2005 having recently wrapped in Burlingame, California.
JavaLobby just sent out its report on the conference to its email list. As a JBuilder user, one of the big bits of news was that Borland is breaking its long-held independence on the Java IDE front and will be porting some of the best features of JBuilder to Eclipse.
But what does this mean for JBuilder?
When it comes to the future of JBuilder, I was not able to get a definite answer. When I asked if Borland would continue to support JBuilder, I was told “for the foreseeable future”. When I asked how long that was, I was told “about a year”. When I asked if that meant that Borland was in fact, planning to phase out JBuilder eventually, I was given the “I can’t comment on that but customer demand will play a roll” answer. So my impression is that Borland is definitely considering phasing out JBuilder.
Sponsored Links
SitePoint Marketplace
Buy and sell Websites, templates, domain names, hosting, graphics and more.
Download sample chapters of any of our popular books.




