I cannot get past this. I can compile and get no errors, but when I try to run my little program I get the above error. I have updated my PATH in the System Variables of the Enviroment Variables just like in step 4 of the installation guide instructs.
import java.awt.*;
import java.awt.event.*;
class Party {
public void buildinvite() {
Frame F = new Frame();
Label l = new Label("Party at Tim's");
Button b = new Button("You bet");
Button c = new Button("Shoot me");
Panel p = new Panel();
p.add(l);
} // more code here...
}
When posting code please UseCodeTags. Please explain how you ran it. I don't see a main() function. This is probably a classpath problem. Did you set your classpath?
First of all welcome to java ranch.
William you are compiling your code that's Ok but how you are running it.
either provide whole source code or just explian.
And tom he is new to java ranch as it is his first post.
So errors can be there.
William just use proper tags to make your post more readable..
@Inder: Tom asked the right questions and provided a link regarding code tags--just telling someone to use the "proper tags" without providing a reference for how to do so doesn't really help.
Inder Kumar Rathore
Ranch Hand
Joined: Apr 14, 2010
Posts: 41
posted
0
I think tom has provided the link that's why i didn't...
William Pair
Greenhorn
Joined: Jun 26, 2010
Posts: 2
posted
0
Thanks everyone for all your help and advise. I will be a better greenhorn on my next posting. Yes I was able to correct my issue by adding a "main" method.