Welcome new comers to this new dimension where time will not bind you to explore this "TECHO STORM"

Please give your views about this Site and feel free to ask any query regarding technology. I am here to give you my best efforts. Do comment if you like any of my post.

I am happy to announce that the blog:zohsoft.blogspot has been moved to new domain "www.techostorm.com". Please visit regularly to be updated with new post coming soon.

Set classpath for java latest post

Last Updated: 04th May- 2011

Wednesday, May 4, 2011

How to set ClassPath in JAVA in Windows 7 and Vista

 In order to run java Programs one needs to set PATH and CLASSPATH in java. Let us see how we can set this. It is very easy just follow few steps and you are done.

You can install java from the given link: Download JAVA


If you don’t have JAVA installed in your system or you didn’t set the path then the command use to compile java will not be recognized. First install the JAVA setup and then proceed to set the class path.




STEP 1: Just right click on “MY COMPUTER” and select “Properties”.




STEP 2: You will be directed to the following screenshot.




STEP 3: Click on “Advanced System Setting”.



STEP 4: Now Click on the “Environment Variable”.


STEP 5: Click “NEW” Button and copy the address (Refer note at last of this post). Go to “My computer>C drive>Program files>Java>jdk1.6.0_20>bin” copy the address and paste it but do add DOT and SEMICOLON before. The setup version may vary so it is better to go to the directory and copy the address instead of writing from this tutorial


STEP 6: Click ok and you will see that it will get added to the window as shown.



STEP 7: Click “New” again and go to“My computer>C drive>Program files>Java>jdk1.6.0_20>lib”. Copy the address and paste it but do add DOT and SEMICOLON as shown.



STEP 8: Click ok and it will also gets added to the “Environment Variable” window. Click ok to close all the window and finally you are done. Now go to command prompt and type “JAVAC” and press ENTER you will see some list and this shows that you have successfully set up the PATH and CLASSPATH in JAVA.

NOTE: In order to copy address Please go to

  1. My computer>C drive>Program files>Java>jdk1.6.0_20>bin
  2. My computer>C drive>Program files>Java>jdk1.6.0_20>lib

Do the same procedure for individuals address.



This is how you can copy address. Thanks for your patience. Please give your comments regarding this post and do ask any query regarding this.

4 comments:

Anonymous said...

Its Really working....... Thanks for this post.............

Anonymous said...

Thank u very much, i can n't believe it's really working. I was exhausted.

I will never forget to set classpath now


thank u so much

Mohammed Imran said...

Thanks for the info... its really good...

Anonymous said...

its realy very informative. I was very worried and got frustrated and now i have this tutorial and it works..... Thanks... please post more...

Post a Comment