What is Java technology and why do I need it?
Java is an object-oriented programming language that can run on any operating system. To run Java applications you first need to install the JRE (Java Runtime Environment). To create your own applications you will need to install the JDK (Java Development Kit). I will cover how to install both of these in this tutorial.
What is Java used for today?
Java is used everywhere. It is simple to grasp and portable, which makes it very usefull. Below are some of the uses in which you will most likely have interacted with Java and may not have even known it.
- Android OS and the games/apps that run on it
- Video games, such as Runescape
- Ecommerce, government, healthcare, insurance and education websites
- Many software tools you use on your computer
- Televisions, gaming consoles, smart watches
- Java is used everywhere, even in the Mars rover by NASA(Article here)
Java (The runtime environment itself)
The JRE is the environment needed for you to run your applications/programs. It includes a class loader for loading the Java class files and the JVM (Java Virtual Machine). The JVM is what allows Java to run on any operating system. It talks to the OS so your Java programs can gather resources it needs such as memory, files, etc.
- Download the latest version of Java (Here) and run it
- When you are ready, click the "Install" button
- Java will now install itself on your computer
- When it is finished, click the "Close" button
Verify Java is installed on your computer:
- Push the windows key on your keyboard
- Type "cmd" (this will allow you to open the Command Prompt)
- Finally, type "java -version"
Congrats! You just installed the Java Runtime Environment (JRE)
Java Development Kit (JDK)
The JDK allows developers to create Java programs that can be executed and run by the JVM and JRE. Don't get the JRE and JDK mixed up. The JDK is a package of tools used for developing Java applications, whereas the JRE is a package of tools for running your Java code.
- Download the Java Development Kit (JDK) (Here) and run it
- The install wizard will appear; click the "Next" button
- Accept the default values at the next window by clicking "Next"
- The wizard will now install the JDK and you can click "Close" on the final window
Congrats! You just installed the Java Development Kit (JDK)