How to install and setup Java Environment on Windows

0
48
java environment

What is Java environment?

A set of software tools required for compiling and execution of a Java application on a computer creates Java environment. Java Runtime Environment (JRE) combines with JVM and other required libraries. To run Java applications, Java Development Kit needs to be installed. JRE is part of Java Development Kit (JDK). To make your computer ready for Java environment, follow the instructions in the section below.

Setting up Java environment

  1. Download Java Development Kit & Java Runtime Environment from oracle.com according to your operating system.
  2. Install Java Development Kit (JDK)install and setup java environmentinstall and setup java environmentinstall and setup java environment
  3. Java SDK has been installed successfully.
  4. Now, install Java Runtime Environment (JRE)install and setup java environment
  5. Now setup “Environment Variables” for Java SDK.
  6. Open your system’s properties & navigate to “Advanced system settings”.install and setup java environment
  7. Click on “Environment Variables”install and setup java environment
  8. Click on “New” buttoninstall and setup java environment
  9. Add “JAVA_HOME” variable in system variables and browse directory where you installed JDK in your computer.install and setup java environment
  10. Add another system variable “PATH” and browse directory where you installed JDK and select ‘bin’ folder.install and setup java environment
  11. Now open your command prompt or terminal & type command ‘ java -version ’ to check whether you have successfully setup Java environment.

how to check java version java -version

If you can see java version, it means you have successfully installed your Java environment. Otherwise, you can repeat all the steps above to do setup again.

Integrated Development Environment (IDE) for Java

vFor basic programs, you can use Notepad or Notepad++ as the code editor, compile code using ‘javac Program.class’ and run it using command ‘java Program’ using the command prompt. But for bigger applications, it comes difficult to handle application during development. To handle bigger programs, IDE can be used. An IDE is a software that provides facilities & tools to the programmers to program an application easily.

For Java, NetBeans & Eclipse are mostly used IDEs. You can practice any of them as the code editor.

  1. You can download “Netbeans IDE” from oracle.com
  2. You can download “Eclipse IDE” from eclipse.org

 

At the end of this chapter, you have an idea of what is JVM, how JVM works, what is JDK, what is JRE, what is IDE and how-to setup environment for Java. Your system is ready for Java application development. In next chapter, we will develop the understanding of some basic concepts and make our first program to print “Hello World” and proceed towards deeper techniques and details of Java.

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here