System cannot find Java, even though I installed it

I recently formatted my Laptop and reinstalled all the programs. I also reinstalled Java 8, and the installation went through without a hitch. However, when I got to websites or use programs that require Java, I get an error saying that it’s not installed. I tried installing Java again, but got the same results. What is happening?
