• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I find the right jar?

 
Matt Galloway
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am fairly new to Java. I've lately been playing with Hibernate but and have run on to a recurring problem...

I go to run an example or project and I have classes that aren't found. I know that I'm missing jar(s) and I usually find them but it's after a huge amount of trial and error and every time I think that there has to be a better way.

Currently I'm missing the class ejb.javax.Stateless... What jar do I need? But more importantly, how can I figure this out on my own more easily?

Thanks,

Matt
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34669
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Matt,

What jar do I need?

That calls is part of J2EE. It is in jar that comes with your application server (JBoss, WebSphere, Weblogic, etc) and typically called J2EE.

But more importantly, how can I figure this out on my own more easily?

When using example code, they usually provide some build instructions that include this.

Sometimes you can get a clue from the package name. For example "javax.ejb.Stateless" begins with "javax". Packages that begin with "java" and "javax" (java extension) tend to be part of the specifications and located in the Java or J2EE jars.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic