문제

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!

도움이 되었습니까?

해결책

Change the run configuration in the toolbar to Web Start:

enter image description here

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

다른 팁

  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!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top