System.setProperty("java.protocol.handler.pkgs",
"com.macfaq.net.www.protocol");
try {
// You can replace this with your own time server
// use tock.usno.navy.mil????
URL u = new URL("time://vision.poly.edu/");
Class[] types = {String.class, Date.class,
Calendar.class, Long.class};
Object o = u.getContent(types);
System.out.println(o);
}
catch (IOException e) {
// Let's see what went wrong
e.printStackTrace();
}