3

Using jmdns 3.4.1, I'm able to see the services advertised by the machines in the LAN, I can also create a service and register it, so that I can see it in my machine. However, when I create a new service in another machine of the LAN, I cannot see it in my machine. I'm using the following code in the other machine:

service = ServiceInfo.create("_workstation._tcp.local.", "service1" ,80, "foobar"); 
jmdns = JmDNS.create();
jmdns.registerService(service); 

1 Answer 1

4

That should be the problem of address.
When you create an object jmdns, it's better to add the inetaddress.

Example:

InetAddress Address = InetAddress.getLocalHost(); 
final JmDNS  jmdns = JmDNS.create(Address);
2
  • yes you are totally right.. I've already olved this problem by adding the ip address.. thanks a lot anyway
    – mimou
    Commented Oct 12, 2011 at 8:53
  • Thank you...worked for me too...but WHY does this work better (InetAddress)?
    – McNinja
    Commented Jan 29, 2014 at 16:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.