Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 17-02-2008, 10:07 AM   #1 (permalink)
Alpha Geek
 
Amir.php's Avatar
 
Join Date: Feb 2007
Location: Allahabad
Posts: 786
Question java program not run


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.
Attached Images
File Type: jpg java error.jpg (29.9 KB, 13 views)
Amir.php is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 17-02-2008, 11:37 AM   #2 (permalink)
In The Zone
 
ruturaj3's Avatar
 
Join Date: Feb 2007
Location: Mumbai
Posts: 214
Default Re: java program not run

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
ruturaj3 is offline  
Old 17-02-2008, 12:40 PM   #3 (permalink)
Alpha Geek
 
Amir.php's Avatar
 
Join Date: Feb 2007
Location: Allahabad
Posts: 786
Exclamation Re: java program not run

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.
Amir.php is offline  
Old 17-02-2008, 12:48 PM   #4 (permalink)
Wahahaha~!
 
Faun's Avatar
 
Join Date: Dec 2006
Location: Pune/there
Posts: 7,675
Default Re: java program not run

Quote:
Originally Posted by Amir.php View Post
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:

http://visio159.wordpress.com/category/java/
__________________
Blog | Flickr | Battlelog
Spoiler:
Asus Z68 V-Pro|i5 2500k|TRUE Black|Ripjaws X|U2311H|N560GTX|D7000|XONAR STX|RE272|RE0|CC51|XE200PRO Walnut| TD II V2| Ultraphile|N5800

Mono
Faun is online now  
Old 17-02-2008, 01:36 PM   #5 (permalink)
Mad and Furious
 
redhat's Avatar
 
Join Date: May 2006
Location: Visual Basic 6.0
Posts: 453
Default Re: java program not run

@Amir.php : Youre error is the same as this thread already running:
http://www.thinkdigit.com/forum/programming/80425-help-java.html#post749983
redhat is offline  
Old 17-02-2008, 05:07 PM   #6 (permalink)
C# Be Sharp !
 
Zeeshan Quireshi's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 1,805
Default Re: java program not run

Your Java Classpath is not set properly .

Here's the tutorial to set-up classpath:

http://java.sun.com/j2se/1.3/docs/to...classpath.html
__________________
There are 10 types of people in the world: those who understand binary and those who do not.
Zeeshan Quireshi is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java programming..how can I distribute java program....? Manojap Programming 5 16-05-2009 02:46 PM
Cannot compile java program in Ubuntu. mehulved Open Source 19 08-03-2006 01:19 AM
Java Program Error! nitish_mythology QnA (read only) 7 06-01-2006 04:37 PM
help in java program shivi4 QnA (read only) 3 08-09-2005 07:27 AM
please help in java program shivi4 QnA (read only) 10 24-08-2005 06:56 PM

 
Latest Threads
- by Charan
- by Sarath
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 12:51 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2