DIGIT-ARC read-only archive · snapshot: July 23, 2026

java program not run

6 posts · originally from https://geek.digit.in/community/threads/java-program-not-run.80453/

Amir.php
Amir.php Original post #1
Feb 17, 2008 at 10:07 AM
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 at 11:37 AM
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 at 12:40 PM
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
Faun #4
Feb 17, 2008 at 12:48 PM
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
redhat #5
Feb 17, 2008 at 1:36 PM
@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 at 5:07 PM
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