Question

When I try to run my applet in NetBeans it tells me that there is no main class. I looked it up and others have had this error, but they don't give great instructions how to fix it. I tried going to Properties > Application > Web Start and changing it to Applet descriptor with my applet class. But, it still doesn't work, and I don't know why. can anyone help me out? Thanks!

Was it helpful?

Solution

Change the run configuration in the toolbar to Web Start:

enter image description here

Now when you click run, it will run the applet.

OTHER TIPS

  1. Try putting in a main class that simply does nothing.

  2. If you have two different classes for this one applet, make sure you are running the one that has a main, only one needs one.

  3. As far as "selecting your applet as the main class" I don't have a clue what that means either.

Hope I've been helpful, I'm new to the whole graphics thing (for java, anyway) too!

If this problem persists, please elaborate!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top