1 Reply Latest reply: Apr 12, 2014 8:05 PM by Frank Shaka
lqlau88 Level 1 Level 1 (0 points)

I'm trying to create a java app that registers our service via Bonjour.   When I run our app (built and run on Windows 7 64-bit), I get this error:

 

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:567)

          at java.lang.Class.forName0(Native Method)

          at java.lang.Class.forName(Unknown Source)

          at com.apple.dnssd.DNSSD.<clinit>(DNSSD.java:503)

 

I'm using dnssd-107.5.jar to develop my Bonjour service.

 

 

These are other parameters in my runtime:

 

java.runtime.name: Java(TM) SE Runtime Environment

sun.boot.library.path: D:\eclipse\workspace\main\jre\bin

java.vm.version: 14.0-b16

java.vm.vendor: Sun Microsystems Inc.

java.vendor.url: http://java.sun.com/

path.separator: ;

java.vm.name: Java HotSpot(TM) Client VM

file.encoding.pkg: sun.io

sun.java.launcher: SUN_STANDARD

user.country: CA

sun.os.patch.level: Service Pack 1

java.vm.specification.name: Java Virtual Machine Specification

user.dir: C:\ProgramData\Test

java.runtime.version: 1.6.0_14-b08

java.awt.graphicsenv: sun.awt.Win32GraphicsEnvironment

java.endorsed.dirs: D:\eclipse\workspace\main\jre\lib\endorsed

os.arch: x86

java.io.tmpdir: C:\TEMP\

line.separator:

 

 

java.vm.specification.vendor: Sun Microsystems Inc.

user.variant:

os.name: Windows 7

sun.jnu.encoding: Cp1252

java.library.path: C:\dll\lib

java.specification.name: Java Platform API Specification

java.class.version: 50.0

sun.management.compiler: HotSpot Client Compiler

os.version: 6.1

user.timezone: America/Los_Angeles

java.awt.printerjob: sun.awt.windows.WPrinterJob

file.encoding: UTF-8

java.specification.version: 1.6

 

 

Anyone knows what's wrong?  I have bonjour installed and bonjour service is running.

 

Leslie


Windows 7
  • Frank Shaka Level 1 Level 1 (0 points)

    You should have "jdns_sd.dll" in your java library path.

     

    By default, the Bonjour install places the "jdns_sd.dll" in C:\Windows\system32 which is the default library path for every Java application.

     

    In your case, however, the java.library.path system property points to C:\dll\lib where may not contain "jdns_sd.dll".

     

    My suggestion is that you find out the reason why your Java app's java.library.path system property is changed this way and restore it to the default one that includes C:\Windows\system32 .