Java Lesson 2 – Installation & Setup| Dataplexa

Installation & Setup

Before we write any real Java code, we need to prepare your system the same way a professional Java developer would.

This step may feel simple, but it is extremely important. Most Java errors beginners face are not coding problems — they come from incorrect setup.

So instead of rushing, let’s understand what we are installing and why each part exists.


What Needs to Be Installed to Run Java

When people say “install Java”, they often mean different things. In reality, Java development requires a specific toolset.

At the center of everything is the Java Development Kit (JDK).

The JDK includes:

  • The Java compiler (to convert your code into bytecode)
  • The Java runtime (to execute programs)
  • Developer tools used in real projects

Without the JDK, you can read Java code, but you cannot build or run professional applications.


Choosing the Right Java Version

Java evolves over time, but companies value stability more than novelty. That is why long-term support (LTS) versions are preferred in production.

For learning and real-world compatibility, we will use:

  • Java 17 (LTS) – modern and widely adopted

This version works well for:

  • Backend development
  • Enterprise applications
  • Spring and modern frameworks

Oracle Java vs OpenJDK – A Quick Clarification

Java is officially owned and maintained by Oracle, and Oracle provides its own Java downloads through its official website. Many beginners naturally expect Java to come only from Oracle.

However, in real-world development, most companies do not rely directly on Oracle’s JDK for day-to-day development or production systems. This is mainly because of licensing considerations and long-term cost control.

Instead, enterprises use OpenJDK, which is the open-source reference implementation of Java. It follows the same Java standards, behaves the same way, and is fully compatible with Oracle Java.

Eclipse Temurin (Adoptium) is a trusted OpenJDK distribution, backed by the Eclipse Foundation and supported by major industry players. It is widely used in professional environments because it is:

  • Free for learning and production use
  • Open-source and enterprise-friendly
  • Stable and long-term supported

For learning Java in a way that aligns with real industry practice, we will use Adoptium throughout this course.

Download Java (Official Source)

Always download Java from an official and trusted source. This avoids security risks and compatibility issues.

This distribution is trusted by enterprises and provides a clean, free, production-ready JDK.


Verifying the Installation

After installation, we need to confirm that Java is correctly available to the operating system.

Open your terminal or command prompt and run:


java --version
  

If Java is installed properly, you will see output showing:

  • The Java version number
  • The vendor information

This confirms that your system can now execute Java programs — exactly what professional build tools rely on.


How Java Programs Will Run on Your System

Here is what will happen once you start writing Java code:

  • You write readable Java source code
  • The compiler converts it into platform-independent bytecode
  • The Java runtime executes it safely on your machine

This separation is the reason Java applications can move from one machine to another without rewriting the code.


What We Are Not Doing Yet

At this stage, we are focusing only on preparing the environment. We are intentionally postponing some topics until the right lesson.

  • How the JVM works internally → covered in JVM, JRE, JDK
  • Using IDEs like IntelliJ or Eclipse → introduced after your first program
  • Advanced build tools → covered in later framework lessons

This keeps your learning clean and avoids unnecessary overload.


What Comes Next

Now that Java is installed and verified, your system is ready to execute real Java programs.

In the next lesson, we will look at how Java is structured internally and how different components work together behind the scenes.

This understanding will make your first Java program much easier to grasp.