Hi Everyone, I am very new to this subject, and have a question which might sound very silly to many of you, but thought would ask for help anyway. I am on page 40 of the Head First EJB Book, and am trying to add the headfirst directory with the .class files to the EJB Jar. But when I select the headfirst directory and click 'Add', only the .class files get added in the Contents text area (at the same level as the META-INF directory) and the headfirst directory doesn't get added. I discovered that I am able to add the headfirst directory under src, which when added to Contents, contains the .java files. (I know that the .java files are not required, but I was just experimenting). Hence, as a workaround, I copied the .class files from under src/headfirst to classes/headfirst with the hope that now when I select src/headfirst the .class files will be added and I would just remove the .java files. However, to my surprise, the .java files did get added at the correct level, but the .class files are again getting at the same level as the headfirst and the META-INF directories. This is how the tree structure looks no matter which way I go about adding the files. + META-INF Advice.class AdviceBean.class AdviceHome.class and not + META-INF - headfirst Advice.class AdviceBean.class AdviceHome.class Can someone suggest where I might be going wrong? Thank you. Anamika
Hi Anamika, This is strange! If you have defined a package in your source code like "package headfirst" and compiled successfully, obviously you have, then there should be no problem at all. I have worked with this examples a couple of times and i didn't have any problem at all. I suggest you should check your package statement again and try recompiling them again and see if it works. Good luck!!
Why do you try to add those .java files? Just put all .class files under your class/headfirst and add this directory in deploytool. If you set up your directories as it was said in book and used correct parameter to javac those .class files would be automatically compiled into that directory.
Space pants. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop