Here's how you can remove Java 1.6 or 1.7 in OS X on your Mac.
1. Open a terminal window.
2. Type in the following command then hit Enter.
sudo rm -rf /System/Library/Java/JavaVirtualMachines/
For more, see the original article at the link below.
How to disable Java on your Mac | Macworld