• 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

Run time Error

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello everyone !
This is my code below !
when i compile this code its fine But when i run this code it
Gives Run time error . plz help me ! What is problem
Any suggestion Greatly Appreciate
class E
{
public void show()
{
int i = 10;
try
{
int z = i/0;
System.out.println(z);
}
catch(ArithmeticException z)
{
System.out.println(" This is error ");
}
}
public static void main(String[]args)
{
E ob = new E();
ob.show();
}
}
Exception in thread "main"java.lang.NoClassDefFoundError: E
M.farhan
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem is in your CLASSPATH.
Use the following to set your CLASSPATH.
SET CLASSPATH=.;%CLASSPATH%
 
reply
    Bookmark Topic Watch Topic
  • New Topic