问题
Are there any other Java libraries for bonjour/zeroconf apart from JMDNS?
回答1:
I'm also curious to find the best cross-platform DNS-SD (Zeroconf, Bonjour, DNS self discovery) library exists out there.
It does sound like Apple's DNS-SD dnssd.jar is the "official" Java library that requires native library support on Windows, Linux, etc, but works out of the box on Mac OSX.
There are other pure Java DNS-SD implementations, but it's unclear if any of them offer a library that is as easy to use or fully tested as DNS-SD (some of the projects appear to be abandoned for 2 years).
- Official Apple DNS-SD mDNSResponder library
- mDNSResponder and jmDNS integration - There's been some work to create a library that provides a common DNS-SD interface to jmDNS and Apple's mDNSResponder implementation. Instructions to use the jmDNS wrapper.
- waiter - Described as a "modern DNS library and an effective DNS-SD (Service Discovery) library." It utilizes java NIO networking.
- jmDNS - JmDNS provides easy-to-use pure-Java mDNS implementation that runs on JDK 1.4 and higher
- JiveDNS - "JiveDNS is a fork of the defunct JmDNS library, used for multicast DNS service discovery and registration." (it itself has not seen an SVN update in over 2 years)
回答2:
mdnsjava is a project that provides mDNS and DNS-SD support for dnsjava (dnsjava.org). Unlike many of the DNS-SD java implementations mdnsjava supports full mDNS DNS RR resolution, not just the resolution of services.
https://code.google.com/p/mdnsjava/
回答3:
Try at:
DNS-SD
-- The same Java DNS-SD APIs are also available in Bonjour for Windows, Bonjour for Linux, Solaris, *BSD, etc., enabling Java software to make use of Zeroconf's DNS Service Discovery across a wide range of platforms, not just on Mac OS X ......
回答4:
Waiter seems to be a pure Java library for DNS-SD. It's available here:
http://code.google.com/p/waiter/
回答5:
Unless your goal is to announce service availability to other mDNS compatible applications or to consume mDNS services from other applications, it might make more sense to implement your own broadcast-based service discovery.
回答6:
dns_sd.jar on windows works fine, download from Apple (SDK for windows). Beware of reinstallations of Bonjour because they tend to overwrite the Program Files/Bonjour directory containing the dns_sd.jar. Airfoil from Rogue Amoeba is one example on this, however they claim to use the Apple original installer.
dnssd.jar on OSX works fine, but is no longer included in the latest Java releases as Oracle has taken over responsibility. However, the file is still on the disk since the 1.6 Java of Apple is on the disk. Just find the file and move it to /externals folder in your latest Java. So it is quite funny-idiotic that Apple provides a well functioning SDK for Windows implementation of Java DNS SD, while not offering anything at all for their own OSX. I anticipate that this is simply the result of hating Java too much over at Apple?
But, does anyone know of a Java implementation of the airtunes protocol; the latest version used in today´s Airport Express and Apple TV, being NOT the same version as used in earlier models of Airport Express ?
I know of qTunes, but it does not work with latest Airtunes versions. (I could get it to work with Rogue Amoeba´s Airfoil speakers for Mac OS X)
I am not monitoring this thread, but can be contacted at chj@hdsoundlab.com for practical questions.
回答7:
I've been working on a simple, pure Java implementation of mDNS Service Discovery. At the moment only synchronous browsing is supported, but I plan to add an asynchronous listener in the next release. It's free software and available on GitHub at https://github.com/fflewddur/hola.
The only requirements are Java 8 and having the slf4j-api available in your class path.
回答8:
I've found more easy to create my own implementation (after experience with WS-Discovery and Bonjour for cross-platform cases) https://github.com/4ntoine/ServiceDiscovery-java. It has both Java and iOS impl for both client and server side.
回答9:
Try avahi4j (https://code.google.com/archive/p/avahi4j/). But the project is archived and there is no active development from 2009.
来源:https://stackoverflow.com/questions/1233204/are-there-any-other-java-libraries-for-bonjour-zeroconf-apart-from-jmdns