Exception in thread "main" java.lang.NoSuchMethodError: main

I know you answered this questions a thousand times, but from all the threads i've read, i understand that it is also a program specific problem. I'm an absolute beginner in Java coding, learning it right now at university... I also undertood from other threads u want me to post in the correct way with the code attached to the message. i hope the form i am posting this thread in is ok... sorry to bother you, but it would be really nice if we could solve this problem somehow:

I created a java file, which compiled without problems; but when i try to run the program, my terminal gives out the failure message stated above.

I already set the classpath variable to the directory i am working in, so i don't think that this is the problem...

anyway, here's the code, hope you can deal with it.

class Widerstand{

//Attribute

float rho;

float laenge;

float flaeche;

publicfloat r;

//Widerstand aus der Formel

Widerstand(float rho,float laenge,float flaeche){

float r=rho*(laenge/flaeche);

}//Formel

//Widerstandswert (direkt 黚ergeben)

Widerstand(float r){

r=r;

}//Wert

//Wert zur點kgeben

float sWert(){

return r;

}

}//class

class Netzwerk{

publicstaticvoid main(String[] args){

float rho=Terminal.askFloat("Rho=");

float laenge=Terminal.askFloat("Leiterlaenge=");

float flaeche=Terminal.askFloat("Leiterdurchmesser=");

}//Argumente

}//class

[2857 byte] By [BdN3504a] at [2007-10-2 9:22:45]
# 1

The error is telling you that the error is:

Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.

Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.

Delete the .class files and recompile programs to insure that the .class files are valid.

ChuckBinga at 2007-7-16 23:29:41 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
u shud execute java Netzwerksince Netzwerk contains the main methodif u try 2 run java Widerstandthen u will get the error
balajigovindana at 2007-7-16 23:29:41 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 3
> u shud execute > > java Netzwerk> since Netzwerk contains the main method> if u try 2 run > java Widerstand> then u will get the errorthou shall type complete wordsthou shall not use sms
aniseeda at 2007-7-16 23:29:41 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 4
hellotry to use wrapper class to execute the file and put import java.io.*;on top of the code page.
centurionsa at 2007-7-16 23:29:41 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...