How to find your Java Home when running multiple versions

When you install Java, it’s part of the installer’s job to tell your system where to find the right language when it’s needed. That’s why you’re able to run Java applications—in fact, you may sometimes run Java applications without ever realizing what language they’ve been written in.

Source: LXer – How to find your Java Home when running multiple versions