To work with java permanent setting of path and classpath variable is very necessary for smooth execution of all the java programs.
To make it easy for you we have given a screen shot of every step.
.;C:\Program Files\Java\jdk1.8.0_05\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_05\lib\tools.jar
Note : "." (dot) represents the current working directory and therefore must be placed in the starting of classpath variable value field as shown above.
To make it easy for you we have given a screen shot of every step.
How to set path variable.
- Right click on "My Computer"--> Click on "Properties".
click on properties.
- Click on Advanced system settings in the left. It opens a below window.
- Click Environmental variables , which will open a below window.
- click new and in the variable name field type as "path".
- In variable value field enter the path of your bin folder.
Usually bin folder in located in C:\Program Files\Java\jdk1.8.0_05\bin - Click OK.
How to set classpath variable.
- Repeat step 1 to step 3 as above.
- in variable name field type as "classpath"
- In variable value field enter the path of rt.jar and tools.jar of jdk.
Example: Value of classpath variable looks like below given value.
.;C:\Program Files\Java\jdk1.8.0_05\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_05\lib\tools.jar
Note : "." (dot) represents the current working directory and therefore must be placed in the starting of classpath variable value field as shown above.
No comments:
Post a Comment