Java is a general-purpose computer programming language that is concurrent, class-based, object-oriented, etc. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of computer architecture. The latest version is Java 19. Below are the environment settings for both Linux and Windows. JVM, JRE, and JDK three are all platform-dependent because the configuration of each Operating System is different. But, Java is platform-independent.  Few things must be clear before setting up the environment which can better be perceived from the below image provided as follows:

  • JDK(Java Development Kit): JDK is intended for software developers and includes development tools such as the Java compiler, Javadoc, Jar, and a debugger.
  • JRE(Java Runtime Environment): JRE contains the parts of the Java libraries required to run Java programs and is intended for end-users. JRE can be viewed as a subset of JDK.
  • JVM: JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides a runtime environment in which java bytecode can be executed. JVMs are available for many hardware and software platforms.

Now let us discuss the steps for setting up a Java environment with visual aids. Let’s use the Windows operating system to illustrate visual aids.

Steps: Here we will be proposing steps for three different operating systems as listed:

  1. Windows operating system
  2. Linux operating system
  3. macOS operating system

A. Windows operating systems

Steps for setting the environment in Windows operating system are as follows: 

Step 1: Java8 JDK is available at Download Java 8. Click the second last link for Windows(32 bit) and the last link for Windows(64 bit) as highlighted below. 

Step 2: After download, run the .exe file and follow the instructions to install Java on your machine. Once you install Java on your machine, you have to set up the environment variable.

Step 3: Go to Control Panel -> System and Security -> System. Under the Advanced System Setting option click on Environment Variables as highlighted below. 

Other Lessons in Introduction to Programming in Java

No. Lesson Reading Time
1 Introduction to Java 5 mins
2 Setting up the environment in Java 5 mins
3 Java Hello World Program 5 mins
4 Java Output 5 mins
5 Java Escape Characters 5 mins
6 Variables & Types 5 mins
7 Arithmetic Operators in Java 5 mins

Related Subjects

or view all subjects
No realted subjects found.