...
Before installing be sure on what's your plan and your 1 - Java Environment.
Run the following commands in order to install or update the Oracle Java. The idea is applicable to others JVM.
...
The installer takes a while since it needs to download the latest Java installer from the Oracle site.
Then check your 1 - Java Environment. A jinfo should exist populated with your appropriate commands, tools or libraries including a unique priority number.
...