Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / August 2006

Tip: Looking for answers? Try searching our database.

java.lang.NoClassDefFoundError

Thread view: 
Gaijinco - 29 Aug 2006 13:11 GMT
I'm sorry to bother with so newbie questions but it is really annoyoing
me!

I have the quintessential error of:

Exception in thread "main" java.lang.NoClassDefFoundError:
ClassName/class

The directory i'm using is:

C:\work\java

I'm using Windows XP and my CLASSPATH has these values:

.;C:\work\java;

Is there something else I'm missing!

Thank you very much!
Jacques-Olivier Haenni - 29 Aug 2006 13:15 GMT
Hello,

I guess that you start the application with 'java ClassName.class'.

Use 'java ClassName' (without the file extension) instead. The argument
is a class name, not a file name.

Cheers,

Jacques-Olivier

> I'm sorry to bother with so newbie questions but it is really annoyoing
> me!
[quoted text clipped - 15 lines]
>
> Thank you very much!
Gaijinco - 29 Aug 2006 19:13 GMT
Thank you very much! It works!

Is this something specific of Windows XP or the newest version of Java?

Again, thank you very much.
Oliver Wong - 29 Aug 2006 19:17 GMT
> Thank you very much! It works!
>
> Is this something specific of Windows XP or the newest version of Java?
>
> Again, thank you very much.

   No, on every platform, every version of java works by typing "java"
followed by the qualified class name (and NOT the filename of the class
file).

   - Oliver


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.