aspose file tools*
The moose likes Beginning Java and the fly likes How do I find the right jar? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How do I find the right jar?" Watch "How do I find the right jar?" New topic
Author

How do I find the right jar?

Matt Galloway
Greenhorn

Joined: Sep 21, 2007
Posts: 1
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

Joined: May 26, 2003
Posts: 31074
    
232

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How do I find the right jar?