Since my three-quarter term report I’ve been working on adding audio input support to the jsound port and fixing various bugs in the JDK. Since the AWT/Java2d and jsound ports are now completed, my goals for the summer have been accomplished! The OpenJDK port is now in a fairly usable state, and community members have been using it to run some large scale Swing apps such as NetBeans and ThinkFree office.
The next thing I would like to do is merge my work in to the Haiku port repository at the OpenJDK project. From there I’d like to look into the possibility of acquiring access to the Java TCK, which will allow for comprehensive testing of the port. This will no doubt uncover many bugs and keep me busy for a while. Here are some other possible areas of expansion for the future:
Since midterm I have been working on the jsound port, which provides audio, MIDI input/output and the ability to control mixer volume and other parameters.
After getting my head around some of the media kit concepts the implementation has gone smoothly. I implemented audio output support first, as I guessed this would be the most used component. It works well. Then I implemented MIDI input and output support. This is untested so far because I don’t have any MIDI hardware.
After my quarter term report I worked on various bugs in the AWT port reported by testers, such as keyboard input problems. I also began reading up on the media kit in preparation for the next part of my project: the jsound port. This will bring audio and MIDI functionality to the OpenJDK port. Over the last week I made a start on the implementation for PCM input/output.
Since my last blog entry I have mostly completed the implementation of the AWT/Java2D port. It is still in need of a lot of testing, but it is stable enough to run a lot of Swing apps out of the box. For example, here’s jEdit and SwingSet:
Over the community bonding period I’ve been researching the best approach to take for the AWT port, and over the past week or two I’ve been implementing a prototype.
AWT demands the implementation of a number of ‘peers’ for buttons, text boxes, etc. which have historically been implemented using the native widgets of the underlying platform. The time taken to implement and maintain these peers is quite large, especially considering that these AWT widgets have been superseded by Swing and are rarely used anymore.
An alternative implementation approach used by the Caciocavallo project involves providing native heavyweights for the windows and views and then calling on Swing to provide drawing and event handling for the various widgets. This eases the porting of AWT and reduces the amount of platform-specific code to maintain. This approach is also taken by the recent port of OpenJDK to Mac OS X.
Over the past week or two I’ve written a prototype implementation using the Caciocavallo Swing AWT peers. It’s very incomplete thus far, but I’ve got drawing working pretty reliably, as well as some event handling including mouse input. Screenshot below the fold.
My Google Summer of Code project for this year is to provide a complete port of OpenJDK 7 to Haiku. Over the past few months I've been working on putting together a bootstrapping environment for building OpenJDK on Haiku, and porting the virtual machine and core libraries. Over the summer I hope to bring the port to a mostly-complete state by adding support for AWT, Java2d and jsound. This will allow Swing and AWT-based applications to run on Haiku.