# java program not run



## Amir.php (Feb 17, 2008)

i recently installed jdk1.6.0_04 on my winxp system.
Any program i compile, they compile  succesfully but when i try to run the following error  appeares on cammand prompt(please the attachement) .
please help.
Also please tell me to set path and class path in java.


----------



## ruturaj3 (Feb 17, 2008)

First reinstall the jdk again.

And save all your programs in other folder, not where jdk is  installed.

You can use set path command , but u will need to type it each time u open the cmd prompt. Else u can set path in enviroment variable only once(No need set it again).

Command is :

set path = "X:\Folder_name\bin"
eg. set path = "C:\jdk1.6\bin"

where, X is drive where u hv installed jdk & folder_name is folder name in which jdk is installed.
U can verify whether path is set or not by using command , path.

For enviromental varible :

My computer -- RClick -- Properties -- Advanced --Environment variables -- System variables -- Path -- Edit -- In variable value field -- after the last word if there is a no semicolon type ; else not.
After the semicolon type the path.
eg. ;C:\jdk1.6\bin

Then press ok.

Reopen the cmd prompt and try javac , java command without any file name
it will show u all the options related with commands.

Now compile & run ur programs.

Happy Programming


----------



## Amir.php (Feb 17, 2008)

returaj3 i have done  all you tell me but same error is also appeared.
i think error of because of no class path set . please solve this problem.


----------



## Faun (Feb 17, 2008)

Amir.php said:


> returaj3 i have done  all you tell me but same error is also appeared.
> i think error of because of no class path set . please solve this problem.



here is a link to my blog about beginners approach to java, it has all the screenshots and a working tutorial, hope it helps:

*visio159.wordpress.com/category/java/


----------



## redhat (Feb 17, 2008)

@Amir.php : Youre error is the same as this thread already running:
*www.thinkdigit.com/forum/showthread.php?p=749983


----------



## Zeeshan Quireshi (Feb 17, 2008)

Your Java *Classpath* is not set properly .

Here's the tutorial to set-up classpath:

*java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html


----------

