Add the three class files (including their package directory) to the JAR
This is the most important part of the whole process! In other words, don’t screw it up. The key is to get the correct classes into the JAR in their package directory structure, and only their package directory structure. In other words, if you put the three class files into the JAR without the headfirst directory, your bean won’t deploy. Or, if you include the classes directory as well as the headfirst directory, your beans won’t deploy. Remember, the ejb-jar is still a JAR file, so the usual JAR rules about package structures apply here.
Navigate to the Advice directory
Expand the classes directory to see the headfirst directory
Select the headfirst directory
Click Add

Use the navigation controls here to get to your Advice directory, where you can see your classes and src directories. Then select the headfirst directory. You don’t have to expand it... we did it so that you could see what’s in there.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access