Skip to main content

HOW TO SET JAVA_HOME, PATH, and CLASSPATH Environment Variables in Windows7

HOW TO SET JAVA_HOME, PATH, and CLASSPATH 



Note: You must be logged onto your computer as the Admin user


  1.  Click the Windows Start button, right-click Computer and select Properties. 
  2.  Click Advanced system settings.
  3.  Click Environment Variables.
  4.  In the Environment Variables window, under System Variables, click the New button.
  5.  In the New System Variable window, enter the following:

       - Variable name: JAVA_HOME

       - Variable value: C:\Program Files\Java\jdk1.8.0_121


          Then click the OK button.



 6.  Select the PATH system variable and click the Edit button.
    (If PATH system variable is not available, click the New button to create a PATH variable
    enter, name it PATH, and enter   C:\Program Files\Java\jdk1.8.0_121
    for the Variable value, and then click the OK button.)

6. In the Edit System Variable window, in the Variable value field, place the cursor at the starting
    position and enter the following:

C:\Program Files\Java\jdk1.8.0_121\bin;

Then click the OK button


7. Click the New button to create another System Variable.
8. In the New System Variable window, enter the following:
- Variable name: CLASSPATH
- Variable value: C:\Program Files\Java\jdk1.8.0_121\lib\tools.jar;.;
(Note: The variable value has a semicolon, a period, and a semicolon at the end.)
Then click the OK button


You have created/updated three system variables. Click the OK button to close the Environment Variables and System Properties windows. Close the Control Panel window


Comments

Popular posts from this blog

How To Run Spring Project After Generate From Spring Initializer

How To Run Spring Project After Generate From Spring Initializer After Generating project from Spring initializer copy generated zip project on any folder like have created a folder in c:\intellijworkspace here paste zip project and extract it as shown below. After that open command prompt and go inside the project directory as shown below           After that inside project folder type command mvn, clean install and press enter as shown below After that project build process started as shown below Finally, Build Process Completed with success message as shown below After Build Successfully to run project type command mvn spring-boot :run as shown below Finally, project up successfully on port 8080 as shown below. To check project status open browser and type localhost:8080 it will display an error page that indicates project run successfully as shown below Now Enjoy Spring Boot ...