简体   繁体   中英

Im missing main class in NetBeans

I accidentally deleted main class in NetBeans from Templates, know I cannot create any projects. Does anyone know how to retrieve it? I tried to reinstall NetBeans but it didn't work for me. So please if anyone knows how to fix this I would appreciate it very much.

Take a look here. Same problem resolved.

UPDATE

Ok. Close NetBeans IDE, go to NetBeans userdir , then to config/templates directory and delete Classes_hidden file.

When NetBeans IDE is started again templates for Java are back.

From here duplicate post

ps Net beans user dir is something like this C:\\Users\\YOUR_USER\\AppData\\Roaming\\NetBeans\\8.2\\config\\Templates I tried this and it worked.

Netbeans automatically updates your work when you clean and run. Just:

  1. open your project
  2. Go to project History / History
  3. Select a period that the project worked correctly before deleting the main class
  4. Right click and revert from History

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM