Why is the EJB client JAR not being created by the Weblogic APPC for my Weblogic 8.1 EJB project?

Abstract: Why is the EJB client JAR not being created by the Weblogic APPC for my Weblogic 8.1 EJB project?

Question:

Why is the EJB client JAR is not being created by the Weblogic APPC for my Weblogic 8.1 EJB project?

Answer:

Once the EJB Client jar is specified in the ejb-jar.xml deployment descriptor using the <ejb-client-jar> tag, Weblogic will generate the EJB client archive. You can pass in the -verbose command to echo the temporary directory used as a working directory for appc. This folder will be the temp directory specified for the current user (e.g. C:\Documents and Settings\decon\Local Settings\Temp), and this is where APPC will generate the EJB client archive.

If you do not see the client archive being created in this folder, however, the problem is probably related to spaces in your user's temp directory. To fix this issue, you can change the user's temp directory to a directory without spaces (right-click My Computer | Properties | Advanced | Environment Variables | User variables for <user name>. You must restart JBuilder for the change to take effect.

If you do not wish to have your client jar created in this folder, you can manually run the following command to generate the client jar in a directory of your choice in the following way:

cd <project directory>
java -classpath "<project classpatch>" weblogic.ejbc <path to EJB Jar>\EJB.jar -compiler <path to javac>/javac

To automate this process, the above command could be put into a batch file and then executed in JBuilder as a "External Build Task" (File | New | Build | External Build Task).