Database not working on El Capitan

I cannot get Java to work for the database. I have contacted Apple and they ran me thru the steps, restarted my computer and still tells me I need the JRE environment installed which it is. I went to the advanced setting and the box is checked so what is wrong?

Need JDK. See answer here.