• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Program crashes before reaching main

 
Jyoti Bodhwani
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what can be the reasons for a program crashing before flow reaches to main ??


 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the exact error message ? Please post the error message, and the stack trace if there is one. One cause could be that the main class is not found.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49865
71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to JavaRanch
 
Rob Spoor
Sheriff
Pie
Posts: 20613
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the class who's main method you are trying to run has static initializers that throw exceptions these will cause the program to abort.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49865
71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are several possibilities, but we can't help without knowing the error message.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic