title: Using hibernate with java console application
body: <p>Maybe my question is very basic, but regretfully I have very little experience with Java EE applications and little understanding of Hibernate.</p>
  
  <p>I am developing a console Java application (that is not-Java EE application), for which I want to configure Hibernate to do the ORM to MySQL database I use for persistence of my data. However, I don't know how to do that and was never able to find any source in the net about it.</p>
  
  <p>So basically:</p>
  
  <ul>
  <li>I have downloaded and put in my buildpath <code>hibernate-jpa-2.0-api-1.0.1.Final.jar</code>, <code>hibernate3.jar</code> and <code>mysql-connector-java-5.1.19-bin.jar</code> libraries.</li>
  <li>I know that I need <code>persistence.xml</code> file to declare my persistence units. In an ordinary Java EE application this will reside in <code>src/META-INF/persistence.xml</code>. However, I am not sure where should I place the file in the case of java console application.</li>
  <li>I was never able to tell whether including the jars in the buildpath and adding the <code>persistence.xml</code> is enough to get me going with Hibernate, so please say if something else is needed.</li>
  </ul>
  
  <p>I hope that somebody with more experience with Hibernate can help me get going.</p>