I would like to use the WatchService API as mentioned in this link: http://download.oracle.com/javase/tutorial/essential/io/notification.html
After reading around, I
after installing the 1.7jdk from oracle, i changed my bash scripts to add:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home
and then running java -version showed the right version.
java -version