This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Program crashes before reaching main Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Program crashes before reaching main" Watch "Program crashes before reaching main" New topic
Author

Program crashes before reaching main

Jyoti Bodhwani
Greenhorn

Joined: Sep 02, 2009
Posts: 1
what can be the reasons for a program crashing before flow reaches to main ??


Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

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.


[My Blog]
All roads lead to JavaRanch
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38075
    
  22
And welcome to JavaRanch
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19656
    
  18

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38075
    
  22
There are several possibilities, but we can't help without knowing the error message.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Program crashes before reaching main
 
Similar Threads
Why is main static
Simple Compiling Question
static string
Processing Time