How to Install Java for Development

After the previous post to What is Java I will now provide a quick start up to installing Java, so you can start to develop your own applications.

Is Java Development Kit and Java Runtime Environment installed?

To check this, on linux and mac OS open terminal (for Windows, open cmd) and type:

javac -version
This will show the JDK version.

java -version
Will show the JRE version.

Please note – it is important that the JDK and JRE versions match – for example 1.8.X for both, where X can be any number, if it is 1.7.X and 1.8.X for the JDK or JRE (or vice versa), the code will not compile as Java needs to be the same version for compilation as running.

Typically, on a mac, it would be installed. If not, Oracle’s official installation JDK and JRE will provide the information to install it.

For Linux, here is the official installation JDK and JRE.

For Windows, here are the System Requirements, then install the JDK and JRE.

If things start to go wrong, here are some quick points to check:

  • Is the JDK and JRE installed already?
  • Are the versions the same or different?
  • For Windows – Is the JDK and JRE on your PATH variables?
  • For Mac and Linux – Is $PATH got the correct path to your JDK and JRE?

For further information – please go to Oracle’s Official Website  for installation tips and requirements.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s