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?
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.