java error in mac os x.2.3 terminal.
I get this error "Exception in thread "main" java.lang.NoClassDefFoundError" when I try to run my *.class file under Terminal? What should I do?
I think I compile it correctly cause it pop up a *.class file with no error comment
I get this error "Exception in thread "main" java.lang.NoClassDefFoundError" when I try to run my *.class file under Terminal? What should I do?
I think I compile it correctly cause it pop up a *.class file with no error comment
import javax.swing.JOptionPane;
public class circle
{
public static void main(String[] args)
{
String input = JOptionPane.showInputDialog ("Please enter the radius");
double rad = Double.parseDouble(input);
double area = Math.PI*2*rad;
double cir = Math.PI*Math.pow(rad,2);
System.out.println("The area is " + area + ".");
System.out.println("The circumference is " + cir + ".");
}
}