• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Run time Error

 
M farhan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • 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
 
Vijay Albuquerque
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is in your CLASSPATH.
Use the following to set your CLASSPATH.
SET CLASSPATH=.;%CLASSPATH%
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic