0

I create new JFrame in Netbeans, and I want to make the JFrame file to be the main class, but when I try to change it in properties package run, there isn't the Jframe file.

And the navigator can't detect the main class. I try to fix the code in public static void (String[] args), but still can't load the main class.

Beside, I haven't added anything to the JFrame file, the default code is still from Netbeans. How to fix it?

I don't know whether this has anything to do with it or not, I use Netbeans 12.0 and jdk 15

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Aasyer
  • 1
  • by the very little you post, I can only wonder how you managed the code to compile. I very much doubt this to be a netbeans issue, I also doubt this to be a runtime issue (unless the signature you posted isn't the one in your code). I also have no idea however how you try to run your code. You should provide much more information – Stultuske Apr 08 '21 at 05:27

1 Answers1

0

I've found the way how to fix it

I tried to uninstall Netbeans 12.0 and change it to the higher version that is Netbeans 12.2. After that, the JForm class finally work

I don't know what's the reason why Netbeans 12.0 can't detect main class from JFrame class tho

Aasyer
  • 1
  • In the future you might want to try deleting the cache first before installing a new version (https://stackoverflow.com/questions/8689780/how-to-clear-the-cache-in-netbeans) and see if that helps. – Joachim Rohde May 26 '21 at 12:51