private static Object initializeJMDNS() { try { jmDNSClass = Class.forName("javax.jmdns.JmDNS"); serviceInfoClass = Class.forName("javax.jmdns.ServiceInfo"); } catch (ClassNotFoundException e) { LogLog.warn("JmDNS or serviceInfo class not found", e); } //if version 3 is available, use it to constuct a serviceInfo instance, otherwise support the version1 API boolean isVersion3 = false; try { //create method is in version 3, not version 1 jmDNSClass.getMethod("create", null); isVersion3 = true; } catch (NoSuchMethodException e) { //no-op } if (isVersion3) { return createJmDNSVersion3(); } else { return createJmDNSVersion1(); } }
private static Object initializeJMDNS() { try { jmDNSClass = Class.forName("javax.jmdns.JmDNS"); serviceInfoClass = Class.forName("javax.jmdns.ServiceInfo"); } catch (ClassNotFoundException e) { LogLog.warn("JmDNS or serviceInfo class not found", e); } //if version 3 is available, use it to constuct a serviceInfo instance, otherwise support the version1 API boolean isVersion3 = false; try { //create method is in version 3, not version 1 jmDNSClass.getMethod("create", null); isVersion3 = true; } catch (NoSuchMethodException e) { //no-op } if (isVersion3) { return createJmDNSVersion3(); } else { return createJmDNSVersion1(); } }
private static Object initializeJMDNS() { try { jmDNSClass = Class.forName("javax.jmdns.JmDNS"); serviceInfoClass = Class.forName("javax.jmdns.ServiceInfo"); } catch (ClassNotFoundException e) { LogLog.warn("JmDNS or serviceInfo class not found", e); } //if version 3 is available, use it to constuct a serviceInfo instance, otherwise support the version1 API boolean isVersion3 = false; try { //create method is in version 3, not version 1 jmDNSClass.getMethod("create", null); isVersion3 = true; } catch (NoSuchMethodException e) { //no-op } if (isVersion3) { return createJmDNSVersion3(); } else { return createJmDNSVersion1(); } }
private static Object initializeJMDNS() { try { jmDNSClass = Class.forName("javax.jmdns.JmDNS"); serviceInfoClass = Class.forName("javax.jmdns.ServiceInfo"); } catch (ClassNotFoundException e) { LogLog.warn("JmDNS or serviceInfo class not found", e); } //if version 3 is available, use it to constuct a serviceInfo instance, otherwise support the version1 API boolean isVersion3 = false; try { //create method is in version 3, not version 1 jmDNSClass.getMethod("create", null); isVersion3 = true; } catch (NoSuchMethodException e) { //no-op } if (isVersion3) { return createJmDNSVersion3(); } else { return createJmDNSVersion1(); } }
private static Object initializeJMDNS() { try { jmDNSClass = Class.forName("javax.jmdns.JmDNS"); serviceInfoClass = Class.forName("javax.jmdns.ServiceInfo"); } catch (ClassNotFoundException e) { LogLog.warn("JmDNS or serviceInfo class not found", e); } //if version 3 is available, use it to constuct a serviceInfo instance, otherwise support the version1 API boolean isVersion3 = false; try { //create method is in version 3, not version 1 jmDNSClass.getMethod("create", null); isVersion3 = true; } catch (NoSuchMethodException e) { //no-op } if (isVersion3) { return createJmDNSVersion3(); } else { return createJmDNSVersion1(); } }
private static Object initializeJMDNS() { try { jmDNSClass = Class.forName("javax.jmdns.JmDNS"); serviceInfoClass = Class.forName("javax.jmdns.ServiceInfo"); } catch (ClassNotFoundException e) { LogLog.warn("JmDNS or serviceInfo class not found", e); } //if version 3 is available, use it to constuct a serviceInfo instance, otherwise support the version1 API boolean isVersion3 = false; try { //create method is in version 3, not version 1 jmDNSClass.getMethod("create", null); isVersion3 = true; } catch (NoSuchMethodException e) { //no-op } if (isVersion3) { return createJmDNSVersion3(); } else { return createJmDNSVersion1(); } }