Netbeans - Error: Could not find or load main class

前端 未结 21 2128
时光说笑
时光说笑 2020-11-28 16:01

So I\'m making a java application in Neatbeans 7.4, been working at it for a while, everything was fine, running the project worked fine, but now when I hit run project, I g

21条回答
  •  孤城傲影
    2020-11-28 16:20

    Possible Fixes:

    Fix 1

    1. Go to project properties (right click on the folder of your project in netbeans)
    2. On left tab where it shows the categories, click on the "Run" selection
    3. Then click on Browse to find the Main class you use on your project

    Fix 2

    1. Go to C:\Users\name\AppData\Local\Netbeans
    2. delete the Cache folder.
    3. Rebuild and Run

    Fix 3 Download most recent version of Netbeans

    Fix 4 Download most recent version of JDK and configure Netbeans to use that

提交回复
热议问题