i googled How Detect internet Connection using Java?
and found this code
try {
Process p1 = java.lang.Runtime.getRuntime().exec("ping www.google.com");
System.out.println(p1.waitFor());
// return 0(zero) if internet is availble
}
catch (Exception e)
{
// caught exception
}
It is working fine in windows.
How change above code so that it works for mac??
Thnax in advance