Following the steps listed will uninstall Oracle Java from your system using a Terminal.
Click on the Finder icon located in your dock
Click on Applications tab on sidebar
Click on the Utilities folder
Double-click on the Terminal icon
In the Terminal window, copy and paste the command:
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin