Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes no classDefination Found Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "no classDefination Found Error" Watch "no classDefination Found Error" New topic
Author

no classDefination Found Error

saikrishna cinux
Ranch Hand

Joined: Apr 16, 2005
Posts: 689
hi,

its very simple doubt

when i compile my java files it does fine but if i need to run the programme by this command ex: java test then it gives error

how to solve it sir

cinux


A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
Timmy Marks
Ranch Hand

Joined: Dec 01, 2003
Posts: 226
Is the name of your class "test" or "Test"? I would make sure that you are using the right class name and either launching java from the directory where the class lives, or that the class is in the classpath.
Philip Heller
author
Ranch Hand

Joined: Oct 24, 2000
Posts: 119
Does your source file contain a package definition?

If so, you need to type "java package_name.class_name".

If not, as Timmy suggests, see if your class name is "test" or "Test". If it's "Test" then you need to type "java Test".

If your class name is "test", be aware that class names really should begin with upper-case letters. And make sure your classpath includes "."


Consultant to SCJP team.<br />Co-designer of SCJD exam.<br />Co-author of "Complete Java 2 Certification Study Guide".<br />Author of "Ground-Up Java".
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: no classDefination Found Error
 
Similar Threads
only 8 days for exam.....
Generics Qs
javamail:-NoClassDefFoundError
Can I build in Java1.4 and run on Java1.6
Problems compiling program-can anyone help??