GeeCON Prague 2014*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Run time Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Run time Error" Watch "Run time Error" New topic
Author

Run time Error

M farhan
Greenhorn

Joined: Jan 17, 2002
Posts: 13
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

Joined: Feb 17, 2002
Posts: 42
The problem is in your CLASSPATH.
Use the following to set your CLASSPATH.
SET CLASSPATH=.;%CLASSPATH%


Vijay Albuquerque
SCJP 1.4, SCWCD 1.3
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Run time Error