Java Swing GUI for Bonjour Applications

Sample Applications

There are three sample applications for BonSwing, all of which can be launched using Java Web Start. They are simple applications, but we hope that they let you see how BonSwing can be applied.

NOTE: You will need to have Apple's Bonjour and its Java libraries installed on your computer in order for this to work. Read this entry to find out how to install Bonjour and the libraries for different platforms.

Instant Messenger

Aimed to be an iChat clone (well, actually, it's not even close) this application lists the friends in your local network. It can currently listen to messages, and will show an empty Jabber stream when your iChat buddy sends you a message and closes the window.


  • If a buddy signs on, it creates a few duplicates of his name. This appears to be due to how iChat updates its DNS-SD record - by doing it multiple times instead of issuing a single update. The BonSwing library should be able to suppress duplicate entries - but does not do so yet.

Drag-n-Drop File Exchange

With this program, you can exchange files by dragging and dropping them on the name of your friend.


  • Sending a file (by dropping it) does NOT work on Linux - this appears to be due to a faulty implementation of the Java drag-and-drop handlers. However, you will still be able to receive files under Linux.
  • You can only drag and drop one file at a time - this does not work for directories.

Multimedia Sharing Streamer

This program will display and play the multimedia files that you wish to share to all your peers.


  • You must have a HTTP server running on your machine on port 80
  • You must have the multimedia files stored under this directory


  • You must have a "Java Media Framework" compatible implementation - JMF or FMJ - installed in order for this to work. Please note that you will have to have both of them set up properly for them to play the multimedia files you are sharing. For instance, JMF comes with MPEG support, but little support for other files. FMJ doesn't play MPEG files (you can install codecs for it), but supports OGG formats natively.

latest news

October 12, 2007
Added sample applications Three sample applications built on BonSwing, all of which can be run through Web Start.

October 3, 2007
Source code for BonSwing and three sample apps committed into CVS. Very poor documentation though, am working on it.