结贴时分不够我会加分的。 编译出错问题已经解决,在于j2ee.jar。 两步打包又出了问题: H:\work\hello\build>jar cv0f std_myfirstejb_hello.jar Meta-inf *.class images 标明清单<manifest> 增加:Meta-inf/<读入=0><写出=0><存储了0%> 增加:Meta-inf/ejb-jar.xml<读入=1013><写出=1013><存储了0%> 增加:Meta-inf/weblogic-ejb-jar.xml<读入=526><写出=526><存储了0%> 增加:Hello.class<读入=213><写出=213><存储了0%> 增加:HelloBean.class<读入=971><写出=971><存储了0%> 增加:HelloHome.class<读入=239><写出=239><存储了0%> 增加:images<读入=0><写出=0><存储了0%> 增加:images/green-cube.gif<读入=14868><写出=14868><存储了0%> 增加:images/orange-cube.gif<读入=14868><写出=14868><存储了0%>H:\work\hello\java weblogic.ejbc -compiler javac build\std_myfirstejb_hello.jar build\myfirstejb_hello.jar ERROR:Error creating descriptor from jar file build\std_myfirstejb_hello.jar: ERROR:Error from ejbc:[EJB:010120]Error:The deployment descriptor 'META-INF/ejb-jar.xml.' was not found in 'build\std_myfirstejb_hello.jar'.Please add this file to the JAR and try again. ERROR:ejbc couldn't load descriptor from jar 错误问题怎样解决?请指教。
weblogic的weblogic81\server\lib\weblogic.jar
jboss下也有这个文件,大概也在lib目录下jboss-j2ee.jar
编译出错问题已经解决,在于j2ee.jar。
两步打包又出了问题:
H:\work\hello\build>jar cv0f std_myfirstejb_hello.jar Meta-inf *.class images
标明清单<manifest>
增加:Meta-inf/<读入=0><写出=0><存储了0%>
增加:Meta-inf/ejb-jar.xml<读入=1013><写出=1013><存储了0%>
增加:Meta-inf/weblogic-ejb-jar.xml<读入=526><写出=526><存储了0%>
增加:Hello.class<读入=213><写出=213><存储了0%>
增加:HelloBean.class<读入=971><写出=971><存储了0%>
增加:HelloHome.class<读入=239><写出=239><存储了0%>
增加:images<读入=0><写出=0><存储了0%>
增加:images/green-cube.gif<读入=14868><写出=14868><存储了0%>
增加:images/orange-cube.gif<读入=14868><写出=14868><存储了0%>H:\work\hello\java weblogic.ejbc -compiler javac build\std_myfirstejb_hello.jar build\myfirstejb_hello.jar
ERROR:Error creating descriptor from jar file build\std_myfirstejb_hello.jar:
ERROR:Error from ejbc:[EJB:010120]Error:The deployment descriptor 'META-INF/ejb-jar.xml.' was not found in 'build\std_myfirstejb_hello.jar'.Please add this file to the JAR and try again.
ERROR:ejbc couldn't load descriptor from jar
错误问题怎样解决?请指教。