I am reading the book Getting Started with WebSphere Application Server Community Edition.
I created an EJB project with Eclipse EE.
import javax.ejb.Local;
Error: The import javax.ejb cannot be resolved
I don't know why I cannot import this class.
Thanks
Probably the comments under the question already answered this, but just in case clarification is needed:
1) In Eclipse, right click on the project --> properties --> java build path
2) Click on add external JAR
3) Add c:\glassfish4\glassfish\lib\javaee.jar (Your directory path to this JAR can of course be different.)
--> Ok the dialog, and now Eclipse should be able to see javax.ejb.* classes.
Please note that this jar file is useful in development, but you need not (should not?) deploy it along with your war or ear files, because the application server container has its own runtime Java EE environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With