Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
samir ware
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
samir ware
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic