I have the same problem since I installed Yosemite. I tried installing the latest Java version (v25 of something) but kept getting the same prompt telling me I need Java. I have no idea what programme is asking for it, I dont have any CS or Photoshop type programmes (nothing at all from Adobe, in fact, apart from Flash). I uninstalled Java altogether but I still get the damn prompt.
As I've stated above some Java versions are not backwards compatible. The prompt is specifically asking for version 6, if you install the latest it won't do anything, you can install 6 and the latest (8) at the same time. Download Java 6 from the Apple page that the more info button links you to.