配置Hibernate需要的包。
连接需要的MySql的驱动包mysql-connector-java-5.1.15-bin.jar。就不需要说了。还有Hibernate的核心包hibernate3.jar,也没必须要特别说明。
当我特意不导antlr-2.7.6.jar包时,会报错。
Exception in thread "main" java.lang.NoClassDefFoundError: antlr/ANTLRException
at org.hibernate.hql.ast.ASTQueryTranslatorFactory.createQueryTranslator(ASTQueryTranslatorFactory.java:58)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:98)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1650)
a