The default install of OF includes a JRE, which is what is being used by the server when it is running. If you want to use a different JRE, you have to configure the scripts to use it instead of the default.
When you run the version command, you are just getting java install that is on your system path, which is a different install altogether.