Hi - I'm doing the Head First EJB book and am getting the following error when I go to compile from the command line like it wants:
C:\My_Programs\EJBClass\Advice\src\headfirst>javac advice.java advice.java:4: package javax.ejb does not exist import javax.ejb.*; ^ advice.java:11: cannot find symbol symbol: class EJBObject public interface Advice extends EJBObject
It does build in the Netbeans IDE - however the book would prefer that I not use the IDE so that I learn the nuts and bolts of everything 1st.
You're missing the EJB classes in your classpath. You need to do something like "javac -classpath XYZ.jar advice.java", where XYZ.jar is the file that contains the EJB classes. Check your EJB container, it should include it.
posted 13 years ago
Is this what you were talking about? If so - it still doesn't work.