Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Object Relational Mapping and the fly likes Which jar contains net.sf.hibernate.cfg ???? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Which jar contains net.sf.hibernate.cfg ????" Watch "Which jar contains net.sf.hibernate.cfg ????" New topic
Author

Which jar contains net.sf.hibernate.cfg ????

samir ware
Ranch Hand

Joined: Jul 27, 2005
Posts: 192
Hi all,
I am novice to Hibernate. I am tring to configure eclipse for hibernate but I am not able to execute
import net.sf.hibernate.cfg.*
as the eclips is not able to find the specified path.
It works fine till
import net.sf.hibernate.*;

But when I try to rt the statement
import net.sf.hibernate.cfg.*
its not able to get the requirs path.
Can anyone tell me which is that jar file which I need to put in the classpath so that the statement
import net.sf.hibernate.cfg.*
will gets executed properly.
thanks in advance
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

That package is in hibernate.jar. Be careful you are using the correct version of Hibernate; that particular package structure is from Hibernate 2, so you'll need to make sure you are using that version.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
samir ware
Ranch Hand

Joined: Jul 27, 2005
Posts: 192
thanks a lot for a quick reaply Paul ...
Paul ..I am using version 3.
So which jar file I need to keep in the class path . and where can I find that jar file . Please let me know the same.
I already kept my hibernate3.jar file in the classpath
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Well, you'll need the jar files you downloaded in the classpath.


I already kept my hibernate3.jar file in the classpath

That's good, however you'll have to start using the version 3 code rather than trying to use version 2 classes if you want that to work.
samir ware
Ranch Hand

Joined: Jul 27, 2005
Posts: 192
Thanks a lot Paul for ur valuable guidance .....
I tried using the code that suits for the version 3 and that works well....
Thank you once again

Regards
Samir ware
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Which jar contains net.sf.hibernate.cfg ????