Welcome to *JimsWorld*

Latest bYte'Z for u r daily Bit(e)'Z….

How to set CLASSPATH for JAVA ??

Posted by jimstech on March 29, 2009

To run java programs in your system without specifying the classpath option while compiling..,

Follow these steps..

To download JDK(latest version) CLICK HERE.

For Windows XP users:

1. Right-click on the My Computer icon

2. Select Properties

3. Click on the Advanced tab

4. Click on the Environment Variables button

5. Edit the old CLASSPATH variable(ie.. under environment variable >>System variables>>path)

Env variables

6. Select it and click edit…Add this in variable value:

for eg:                             ;C:\Program Files\Java\jdk1.6.0_10\bin

Dont forget to insert ” ; ” infront of the path.

ie.     ;C:\Program Files\Java\jdk1.6.0_10\bin


this is where your javac(compiler) file is located.

7. Click on OK buttons until you have closed the Properties.

8. Log off, then log back on to u r account to ensure that your environment variables are set.

Now you are done….

To know more about JAVA installation click HERE..



5 Responses to “How to set CLASSPATH for JAVA ??”

  1. shylaja said

    hey……that was very useful….pls do give us some tips to avoid very commonly faced errors in java

    • jimstech said

      thnkzz 4 u r comment..
      It seems..You haven’t set the classpath correctly.

      Solve it by setting the classpath correctly(the CLASSPATH environment variable).

      which JDK version u r using??

  2. shylaja said

    NoClassDefFoundError……………tats de error i get pls help………

  3. Jim said

    To avoid those exceptions 🙂 u can simply download and install netbeans or jcreator..

    Note:This applications are not recommended for beginners..

    Main advantage of these apps are..
    * No need to set class path
    * can get the output at the same window
    * building swing and applet programs are easy
    * can determine the GUI design before compiling, graphically
    * debugging is very easy while programming
    * errors are highlighted automatically before compiling
    * can pack and unpack files easily
    * And much more….

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: