File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Does frameworks have main method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Does frameworks have main method" Watch "Does frameworks have main method" New topic

Does frameworks have main method

Amirtharaj Chinnaraj
Ranch Hand

Joined: Sep 28, 2006
Posts: 241
hi guys

does frameworks like struts,spring,Hibernate have main methods
it that true that all j2ee frameworks will have main method

looking for your replies
Rob Spoor

Joined: Oct 27, 2005
Posts: 20279

A main method will only be used for starting an application. Since frameworks are not applications, they don't need to have main methods. If they do it's probably for testing only.

How To Ask Questions How To Answer Questions
arun nohwar

Joined: Aug 05, 2008
Posts: 16
Framework relies on servlet to start the framework application. JSF and Struts we define servlet in web.xml.
Hibernate, probably we have to do mapping and create java objects for database before starting our application.
I dont know about spring and other frameworks.

But framework does not rely upon main method to start the framework application.
[ August 05, 2008: Message edited by: arun nohwar ]
I agree. Here's the link:
subject: Does frameworks have main method
jQuery in Action, 3rd edition