• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.lang.noclassdeffounferror

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can some please help me.I am getting an exception message when i try to run my programs, and it is not giving me any results other than this exception..
c:\jdk1.3\bin\>java E
Exception in thread " main" java.lang.NoClassDefFoundError : E
Thank you In advance.

------------------
 
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Assuming that you have a class defined somewhere called "E", you probably need to include the location of "E" in your CLASSPATH. What kind of machine are you on?

Originally posted by Komal Mat:
can some please help me.I am getting an exception message when i try to run my programs, and it is not giving me any results other than this exception..
c:\jdk1.3\bin\>java E
Exception in thread " main" java.lang.NoClassDefFoundError : E
Thank you In advance.


 
Komal Mat
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Matt,
The following is the program
class A {}
class B {}
class C {}
class E {
public static void main(String[] args) {
System.out.println("Strange thing in E.");
}
}
class F {
public static void main(String[] args) {
System.out.println("Strange thing in F.");
}
}
I saved the Program as D.java And i am Running the E.class file to get the result printed onto the console.
I am working on Windows 98 and jdk1.3. I have c:\jdk1.3\bin in the CLASSPATH and also in the PATH of AUTOEXEC.BAT. but still i am getting this exception.
i am getting this excetion for any program that i am running.
thanks for your help.
Komal
 
Matt Senecal
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I ran your code and it works fine. Make sure that the directory where your class files (E.class, D.class, etc.) are located is in your CLASSPATH. Or, cd to that directory and run java from there.

Originally posted by Komal Mat:
Hi Matt,
The following is the program
class A {}
class B {}
class C {}
class E {
public static void main(String[] args) {
System.out.println("Strange thing in E.");
}
}
class F {
public static void main(String[] args) {
System.out.println("Strange thing in F.");
}
}
I saved the Program as D.java And i am Running the E.class file to get the result printed onto the console.
I am working on Windows 98 and jdk1.3. I have c:\jdk1.3\bin in the CLASSPATH and also in the PATH of AUTOEXEC.BAT. but still i am getting this exception.
i am getting this excetion for any program that i am running.
thanks for your help.
Komal


 
Komal Mat
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you very much Matt, It is working now.
------------------
Komal Mat
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic