irrfan jamadar wrote:Static block runs once and it is before program enter into main().
Except that this is apparently no longer the case in Java 7.
This block may be used to check the requisite h/w and s/w requirement for successful execution of main program.
No, that would not be a good idea. If you need to do that, just do it from main().
Generally the only job of your main class should be to prepare the app for execution and then start that execution. Anything you need to do in that class should be done in the main() method or in methods called by main(). There's probably never any reason to use a static initializer block in that class.