I don’t think @rl is giving us full details.
Java 6 SE was automatically included up to 10.8. So if an upgrade was done from 10.7 to 10.8, then the machine would automatically have java from the previous version.
Starting with 10.8, the java 6 SE and stubs are the only things included (assuming a fresh installation, not upgrade). The stubs actually link to the apple java installer, so, by running javac the first time, you get a GUI popup prompting you to install.
Apple adds special sauce to their java, breaking write-once run everywhere.
Also, apple’s java is in a different directory tree:
Structure of the home directory is different also, oracle uses the unix bin directory and apple uses Commands directory.
I have java_home and $JAVA_HOME set to java 7, as well as all soft links relating to java pointing to 7, and yet, when running LO, it still manages to find java 6 since the installer pops up, meaning this path is hardcoded somewhere. This only happens when using Calc and attempting to run a custom function, so may be related to the UNO bridge.
The LO SDK also finds the apple home directory, as if hardcoded. When running setsdkenv_unix, if you manually specify JDK 7 home, it will not accept it.