Hi all,
I've been having one of those really annoying problems that you just KNOW must be some damn simple setting somewhere and can't for the life of you figure it out.
I wanted to write a simple java program to use Apple's DNS Service Discovery APIs to broadcast a service on a wifi network (for the Bonjour zero-configuration protocol). The code itself is very simple (and runs on my friend's computer).
However, when I run this code I get the following runtime exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jdns_sd in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at com.apple.dnssd.AppleDNSSD.<clinit>(DNSSD.java:596) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at com.apple.dnssd.DNSSD.<clinit>(DNSSD.java:529) at server.ServiceAnnouncer.registerService(ServiceAnnouncer.java:22) at server.Main.main(Main.java:17)
Now I must say that there was some fishy things going on when I was installing the Bonjour SDK. First, it didn't install. I forget what the error message was, but it prompted me to go to Control Panel and uninstall 3 items marked "Java Update blah blah". It installed after that, placing a bunch of files in C:\Program Files\Bonjour SDK\ . However, the files seemed to be different than those on my friend's computer. Namely, I couldn't find a dns_sd.jar file anywhere. So I got that file from my friend, placed it in a folder on the desktop, and added to the project.
In my desperate attempts to fix this, I also added any directory with Bonjour SDK files to the PATH variable and edited the eclipse ini file to run the java vm with the -Djava.library.path option, again adding those directories to the path. All to no avail.
So if anyone knows how I can fix this situation, I would highly appreciate it. Alternatively, if anyone knows how I can purge all java related files, settings, registry values, etc. (WHATEVER THERE MAY BE) out of my system in order to do a clean install with all the files in the right places, that would be good too.
Cheers,
DR