Java version 1.7.x or later is recommended for better security. Check whether Java is already installed on your system using the command line as shown:
- Open the Terminal.
- Type java -version and press Enter.
You will see the following output:
java version "1.7.0_21" Java(TM) SE Runtime Environment (build 1.7.0_21-b11) Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
If Java is not installed on the system, use the following instructions to install Java:
- Visit http://www.oracle.com/technetwork/java/javase/downloads/index.html.
- Download the latest version of the Java JDK. Install the JDK.
- Verify by typing java -version at Command Prompt.