Why “Error: Could not find or load main class addstudent.AddStudent” is showing

前端 未结 3 1404
醉话见心
醉话见心 2021-01-24 11:29

I am developing a project using NetBeans IDE. I am new to javafx. I created a class \"AddStudent\" in a package named \"addstudent\". When I ran the class, I got \"Error: Could

3条回答
  •  灰色年华
    2021-01-24 12:02

    I'm running your code and it works fine. What I did

    1. Created New -> JavaFx Main Class -> AdStudent -> Copy/Pasted your code

    2. Right click on Project -> Properties -> Run -> Browse Application Class -> Select class addstudent.AddStudent

    3. Clean and Build

    4. Run Project

    I have a feeling the first 2 are fine for you. You may just need to Clean and Build.

提交回复
热议问题