Contact Us
  
 
 
    SearchSearch   RegisterRegister   Log inLog in 

Exception in thread "main" java.lang.NoClassDefFou

Exception in thread "main" java.lang.NoClassDefFou

 
Post new topic   Reply to topic     Forum Index -> Java,Struts framework, Velocity, JSF, Hibernate, Servlet, JSP, javaBeans
View previous topic :: View next topic  
Author Message
sujimert



Joined: 23 Jan 2007
Posts: 5

PostPosted: Tue Jan 23, 2007 4:38 pm    Post subject: Exception in thread "main" java.lang.NoClassDefFou Reply with quote




Hi friends,

Exception in thread "main" java.lang.NoClassDefFoundError: what is this error. I am not able to understand this problem. When i try to compile my java file, it compile successfully. But when i interpret this class file this error come.

How to remove this error in java
Quote:

Exception in thread "main" java.lang.NoClassDefFoundError:


I am using JDK 1.5, and i have done environment setting as classpath and path in both
Quote:

c:\jdk1.5\bin in both classpath in and path.

but still it is giving as error of main thread exception
If anyone know please please let me know thanks
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 24 Aug 2006
Posts: 30

PostPosted: Thu Jan 10, 2008 7:21 am    Post subject: Exception in thread "main" java.lang.NoClassDefFou Reply with quote

This is not easy way to remove this
Exception in thread "main" java.lang.NoClassDefFoundError:
error from java code. If java code is perfect. then this is your problem
classpath

But when you run any class file
with .class extension this errors come
SO run your class with class extension

e.g java SimpleRead.class
This through an error in my system
Exception in thread "main" java.lang.NoClassDefFoundError: SimpleRead/class

Use like this

Quote:

java SimpleRead

Back to top
View user's profile Send private message Send e-mail
seniormember
Site Admin


Joined: 20 Jul 2008
Posts: 77

PostPosted: Thu Sep 18, 2008 7:08 am    Post subject: Reply with quote

You can execute your class with classpath then you will not get this error.

if TestExample.class is in
e.g
C:\myApp\src>
Code:

java -classpath . TestExample


Or

set classpath in environment variable

Code:
set classpath=c:\myApp\src
Back to top
View user's profile Send private message
javatech



Joined: 19 Jan 2007
Posts: 39

PostPosted: Tue Nov 18, 2008 4:48 pm    Post subject: Reply with quote

why this problem comes, should we install with some point to keep in mind?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Java,Struts framework, Velocity, JSF, Hibernate, Servlet, JSP, javaBeans All times are GMT
Page 1 of 1

 
Jump to:  
  Quick Post a Reply Topic
     
  Name (required)  
     
  Email Address (will not be published) (required)  
     
  Subject of topic (required)  
     
   
     
   
     
  Advertisement  
     
 
     


  More Links  
 
JSP Introduction
JSP Setup
Simple JSP Example
JSP Variable
Array Declaration in JSP
JSP Forms and User Input
Form Validation
JSP Cookies
JSP Session Object
Loop, content collection, iterator, conditional check in JSP
JSP Application Object
JSP Include
JSP Response Object
JSP Request Object
JSP Error Handling
JSP File Handling Object
JSP Action Tag
JSP Implicit Objects
JSP Declaration
JSP Directive
JDBC Introduction
JDBC Driver
JDBC Connection
JDBC Prepared/Statement
JDBC ResultSet
JDBC Close Connection object
JDBC Insert
JDBC Display Records
JDBC Update
JDBC Delete
JDBC Sorting
JDBC Query
JDBC Exception
JDBC Add Batch
JDBC Transaction/RollBack