Setting up the java environment

Setting up the environment in Java


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 11.

Below are the environment settings for Windows. JVM, JRE and JDK  all three are platform dependent because the configuration of each Operating System is different. But, Java is platform-independent.

There are few things which must be clear before setting up the environment

a). JDK(Java Development Kit): JDK is intended for software developers and includes development tools such as the Java compiler, Javadoc, Jar, and a debugger.
b).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 view as a subset of JDK.
c). 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. 

Steps for Setting up Java Environment for Windows

1. Java8 JDK is available at Download Java 8.
2. After download, run the .exe file and follow the instructions to install Java on your machine. Once you installed Java on your machine, you have to a setup of the environment variable.
3. Go to Control Panel  -> System.
Under Advanced System Setting option click on Environment Variables as highlighted below.

4. Now, you have to alter the “Path” variable under System variables so that it also contains the path to the Java environment. Select the “Path” variable and click on Edit button as highlighted below.

5. You will see a list of different paths, click on New button and then add the path where java is installed. By default, java is installed in “C:\Program Files\Java\jdk\bin” folder OR “C:\Program Files(x86)\Java\jdk\bin”. In case, you have installed java at any other location, then add that path.
6. Click on OK, Save the settings and you are done !! Now to check whether the installation is done correctly, open command prompt and type javac -version. You will see that java is running on your machine.
7. In order to make sure whether the compiler is set up, type javac in command prompt. You will see a list related to javac.

Related Articles

post a comment