Friday, August 26, 2022

Setting up the environment variables for Java in Windows

How to set the Environment Variables for Java in Windows?

Step 1 - Go to Control Panel -> System and Security  System. In System, select the Advanced System Settings option as highlighted below. 


Step 2 - Under the Advanced System Setting option click on Environment Variables as highlighted below. Alternately, you can also search for Environment Variables in Windows search and it will directly go to Environment Variables



Step 3 - Now, 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 the Edit button as highlighted below. 
NOTE: Edit the Path in System Variables, and not in User Variables



 

Step 4 - You will see a list of different paths, click on the New button, and then add the path where java is installed. Add the path of the location where you have installed Java. 



Step 5 - Click on OK to save the settings. Now to check whether the installation is done correctly or not, open the command prompt and type java --version. You will see that java is running on your machine and it will also display the installed Java version.



To make sure whether the compiler is set up, type javac in the command prompt. You will see a list related to javac.



Congratulations Java is now installed in your system

No comments:

Post a Comment

Setting up the environment variables for Java in Windows

How to set the Environment Variables for Java in Windows? Step 1 -   Go to Control Panel -> System and Security  System .  In System, sel...