Yosemite keeps asking to install Java runtime, while it's installed
Install the SDK instead of the JRE.

I had a similar issue: I installed the JRE and ran the webpage-based test that said I installed successfully. But my java-based app wouldn't run, and running java -version in the console said Java was not installed. On a whim I decided to install the full SDK and now it all works.