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 16-02-2008, 09:34 PM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: Nov 2007
Posts: 14
Default help for java


hi ! I am using jdk 1.5 but I am not able to execute any of the program. Program gets compiled but when I try to run the program it gives :
Exception in thread "main" java.lang.NoClassDefFoundError: First
I also tried j2sdk1.4.1_01 but the problem remains the same.
peyoush_thakur is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 16-02-2008, 09:40 PM   #2 (permalink)
Mad and Furious
 
redhat's Avatar
 
Join Date: May 2006
Location: Visual Basic 6.0
Posts: 453
Default Re: help for java

The following information may be usefull :
Quote:
Popular Error Encountered: Some times you may encounter
an error during the execution of program.
Exception in thread “main” java.lang.NoClassDefFoundError:
filename
Solution
Go to control panel -> System -> Click on Advanced Tab then
on “Environments Variables”
Double click on classpath and specify this path —
.;c:\Progra~1\Java\jdk1.5.0\jre\lib\rt.jar;c:\prog ra~1\Java\jdk1
.5.0\lib\dt.jar
This is taken from Nitish Upreti's Book for Beginners.
Maybe It can help you...
redhat is offline  
Old 16-02-2008, 09:48 PM   #3 (permalink)
Google Bot
 
Pathik's Avatar
 
Join Date: Aug 2005
Posts: 9,772
Default Re: help for java

This error most commonly occurs when you try to run the compiled program using
Code:
java file.class
or
Code:
java file.class
Or if there was an error while compiling.

If it compiled correctly use

Code:
java file
__________________
My new blog: www.pathikshah.com
Pathik is offline  
Old 16-02-2008, 11:56 PM   #4 (permalink)
Wahahaha~!
 
Faun's Avatar
 
Join Date: Dec 2006
Location: Pune/there
Posts: 7,675
Default Re: help for java

Quote:
Originally Posted by redhat View Post
The following information may be usefull :

This is taken from Nitish Upreti's Book for Beginners.
Maybe It can help you...
that cant be cuz he is able to javac

post the code here.
__________________
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, 11:42 AM   #5 (permalink)
In The Zone
 
ruturaj3's Avatar
 
Join Date: Feb 2007
Location: Mumbai
Posts: 214
Default Re: help for java

May be in ur code ur class name is Sample,
And u hv save the file with sample.java.

In java, class name & file name must be same(case sensitive).
ruturaj3 is offline  
Old 17-02-2008, 01:35 PM   #6 (permalink)
Mad and Furious
 
redhat's Avatar
 
Join Date: May 2006
Location: Visual Basic 6.0
Posts: 453
Default Re: help for java

Quote:
Originally Posted by T159 View Post
that cant be cuz he is able to javac

post the code here.
Yes, You maybe be able to compile, but the class wont execute.
Has'nt it been said, "during execution"??
This does work, thanks to nitish_mythology (on this forum)
redhat 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
c++, java and more mak1012 Open Source 11 10-08-2006 03:47 PM
JAVA or C..need help Alexander_H QnA (read only) 21 02-02-2005 02:41 AM

 
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