List of usage examples for java.lang SecurityManager checkMulticast
public void checkMulticast(InetAddress maddr)
SecurityException
if the calling thread is not allowed to use (join/leave/send/receive) IP multicast. From source file:Main.java
public static void main(String[] args) throws Exception { InetAddress add = InetAddress.getLocalHost(); System.setProperty("java.security.policy", "file:/C:/java.policy"); SecurityManager sm = new Main(); System.setSecurityManager(sm); sm.checkMulticast(add); System.out.println("Allowed!"); }