HOW TO SET JAVA_HOME, PATH, and CLASSPATH
Note: You must be logged onto your computer as the Admin user
- Click the Windows Start button, right-click Computer and select Properties.
- Click Advanced system settings.
- Click Environment Variables.
- In the Environment Variables window, under System Variables, click the New button.
- 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.
(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
Post a Comment