Please follow this TWO PART How to on installing Java for your Mac.
You will need to install TWO Java items.
Part 1 Download and install Java (JRE)
Go to https://java.com/en/download/ and downlod Java (JRE)
Install the JRE download
Make sure you’ve installed it.
Part 2 Download and Install Java for OS X 2015-001
Download and install.