- Debugger: Getting mixed signals
- 'Packaging Infrastructure' Contract Weekly Report #4
- Haiku monthly activity report - 06/2015
- 'Packaging Infrastructure' Contract Weekly Report #3
- 'Packaging Infrastructure' Contract Weekly Report #2
- GCI 2014 winners trip report (mentor side)
- TeX Live and LyX; Changes to the boot code
- 'Packaging Infrastructure' Contract Weekly Report #1
- Beginning of 'Packaging Infrastructure' Contract
- Haiku monthly activity report - 05/2015
OpenJDK port: community bonding report
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.
In my introduction I also promised some binaries, which you can now get here: http://dl.dropbox.com/u/61946213/j2sdk-haiku.tar.xz.
You should be running at least hrev44069 if you want this to work properly. The whole thing weighs 140MB unpacked.
- hamish's blog
- Login or register to post comments


Comments
Re: OpenJDK port: community bonding report
Excellent work so far, well done. I'm looking forward to the day when I can run Eclipse on Haiku (and hopefully the CDT plugin too). :)
Re: OpenJDK port: community bonding report
WOW :-) excellent work.
I dream to develop android app on haiku :-)
stargater
Re: OpenJDK port: community bonding report
really impresive progress so far, keep it coming. Surely going to test it
Re: OpenJDK port: community bonding report
Hallo,
Great Stuff!
Its a pleasure to see openjdk running on haiku!
Best regards
Andreas
Re: OpenJDK port: community bonding report
Thanks for the update, Hamish. Nice seeing you making progress from the start!
Will the implementation of the the AWT make a difference in the nativeness of the look of the widgets?
Regards,
Humdinger
Re: OpenJDK port: community bonding report
Yes it will: the usual way of implementing AWT is with native widgets, so in that case they'd have a native look. This way of implementing AWT uses Swing for drawing, so the widgets get a Swing look and feel. However, as the amount of Java software that uses AWT widgets is very small, I don't think this is an issue.
IMO, instead of implementing native AWT widgets, time would be better spent implementing a Haiku look and feel for Swing. That way both Swing software and AWT software (since the AWT implementation uses Swing) would get a native look.
Re: OpenJDK port: community bonding report
A native Haiku look for swing does indeed sounds like the way to go. Those optical issues may be tweaked at a later point, I guess, after your heavy lifting of the actual port is out of the way. :)
Thanks very much.
Humdinger
Re: OpenJDK port: community bonding report
Hi,
do you want any kind of feedbacks. i "tested" your openjdk build with 3 apps.
- 1 Swing app that works half the way - Not bad. It seems to be fast. Yeehaa.
- 2 mainly nio (network server and client) console apps did fail for some reasons
Just contact me if you want backtraces or something.
Best regards
Andreas
Re: OpenJDK port: community bonding report
All sounds and looks good. Though not being familiar with all the ins and outs of Java. I would just like to see Java on Haiku, so I could use the Arduino IDE.
Re: OpenJDK port: community bonding report
Really awesome work Hamish. Looking forward to your progress over the rest of the summer!
I definitely agree keeping the platform layer as small as possible is the way to go - less code to maintain, and less complicated handling required to make the native widgets behave as Java developers expect them to. A native look for Swing would be ideal eventually. In fact I wonder if we could create some abstraction for the look of controls which we could then "compile" into the required classes for BControlLook, whatever Swing uses, and QStyle for the Qt port. Possibly overkill though.