I want to make a Java program that allow me this discover my nearby computers who is running the same problem. Which is similar like the iTunes, can discover nearby computer who enable sharing in the iTunes. How can I implement it using open source library? Also, cross platform is very important. Any ideas on that? Thank you.
-
possible duplicate of [Are there any other Java libraries for bonjour/zeroconf apart from JMDNS?](http://stackoverflow.com/questions/1233204/are-there-any-other-java-libraries-for-bonjour-zeroconf-apart-from-jmdns) – Riduidel Nov 02 '10 at 16:10
5 Answers
Well, Bonjour itself is open source, so you might want to start there...

- 27,873
- 3
- 67
- 84
-
But I would like to use it on Linux too... So, I need to port that on Linux? – Tattat Nov 02 '10 at 16:08
-
According to wikipedia, the Apple implementation is available for Linux too http://en.wikipedia.org/wiki/Zero_configuration_networking#Apple_Bonjour – David Gelhar Nov 02 '10 at 16:12
-
On Linux Avahi is a very nice implementaiton. Installed by default on Ubuntu. – Thorbjørn Ravn Andersen Apr 29 '11 at 05:59
jmdns is a full Bonjour/Zeroconf implementation written in Java compatible with Apple. There is no dependency on native libraries, it is 100% Java.

- 73,784
- 33
- 194
- 347
I think you definitely should take a look at UPnP. Considering the cross-platformness of such a solution, and its implementation using Java, you can consider
- UPNPLib
- Cyberlynk for Java
- And even the various ways to connect an OSGi application to UPnP.
Finally, considering existing implementation of Bonjour using Java, this reply to a stackoverflow question sums it up.
-
If anyone have actual experiences with these solutions, I'd like to hear them. – Thorbjørn Ravn Andersen Aug 11 '11 at 07:54
You can use Avahi - an open-source implementation for zeroconf, which is the protocol used by iTunes. There's a nice list of options for Java at:
http://elliotth.blogspot.com/2009/03/registering-service-with-dns-sd-from.html

- 33,220
- 7
- 94
- 114
I don't know how far it ever got, but Java had the JXTA project, it might do what you want.

- 2,441
- 19
- 22