用jbuilder自己做一个ear试试看

解决方案 »

  1.   

    我知道,但你要给分。
    例如:我有a.jar,b.war和application.xml要生成c.ear
    目录结构:CEAR\a.jar&b.war,CEAR\MEATA-INF\application.xml
    然后再CERA目录下执行:jar cvf CEAR.ear就行了。你的目录结构不对,没有MEATA-INF目录,WL怎么会发布?
      

  2.   

    to:yyt99(疯度翩翩)我的目录结构是weblogic的例子beanManaged,如果我直接用ant build.xml就没有任何的错误,但我想把build.xml中的语句转换成语句,这样自已会更了解些,下面这段话我分析了几天都没有分析出来
    <!-- Put the ejb into an ear, to be deployed from the ${APPLICATIONS} dir -->
      <target name="ear_app" depends="jar_ejb">
        <ear earfile="${APPLICATIONS}/ejb11_basic_beanManaged.ear" appxml="${source}/application.xml">
          <fileset dir="${dist}" includes="ejb11_basic_beanManaged.jar"/>
        </ear>
      </target>我一定给分
      

  3.   

    <!-- Put the ejb into an ear, to be deployed from the ${APPLICATIONS} dir -->
      <target name="ear_app" depends="jar_ejb">
        <ear earfile="${APPLICATIONS}/ejb11_basic_beanManaged.ear" appxml="${source}/application.xml">
          <fileset dir="${dist}" includes="ejb11_basic_beanManaged.jar"/>
        </ear>
      </target>
    我先帮你分析一下这段内容吧:
        1.examples.properties:在build.xml文件的以开始会有一段<property file="../examples.properties"/>,其中,examples.properties(C:\bea\wlserver6.1\samples\examples.properties)就是设置一些文件目录结构和其他的东西,${APPLICATIONS}这个变量就是在其中设置的.
        2:target : 属于ant内部的东西,相当于任务的标识。
        3:ear:说明你要打一个*.ear的包,就是Enterprise Application的包。
        4:earfile:是指要打得ear文件的路径及名字。
        5.appxml:为ear包需要的application.xml(application.xml为发布ear包必须包含的文件)
        6。fileset:设置文件目录,dir为设置当前的目录
        7.includes:为要包含的文件。原因:
        jar cvf %APPLICATIONS%/ebj11_basic_beanManaged.ear application.xml dist/ejb11_basic_beanManaged.jar 
        
        像你这样写,肯定不行。要注意examples.properties中定义的变量。我先说这么多吧。我不能上QQ,MSN.
    我的MAIL:[email protected]