• Post Reply Bookmark Topic Watch Topic
  • New Topic

Compiling and running program with no main class, how is that possible?  RSS feed

 
Robson Martinz
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello people!
I made a software using Netbeans and javaswing. Accidently i deleted my main file which contains my main class and main method. Just to test, i tried to compile and run and it worked but the style of my buttons and windows has changed.
So, what happened? How can i change the style of my programs?

 
Paweł Baczyński
Bartender
Posts: 2083
44
Firefox Browser IntelliJ IDE Java Linux Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You deleted your source code but probably your compiled class is still there. That's my guess.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12563
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also know that Netbeans and other IDEs sometimes do things for you when you make mistakes...could it have created a generic main behind the scenes? I'd say try wiping out your class files and compile from the command line and see what happens.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!