1 Reply Latest reply on Aug 29, 2006 3:54 PM by klouise80

    Building with Ant


      I try to build my application using Ant. Here is the fragment from build.xml:

      <java jar="${flex.mxmlc.jar}" fork="true">
      <arg line="-file-specs ${src.dir}/${app.name}.mxml"/>
      <arg line="-load-config ${flex.dist.config}"/>

      When I run this, I get this error:

      [java] command line: Error: default arguments may not be interspersed with other options

      [java] Use 'mxmlc -help' for information about using the command line.

      When I do not use "-load-config" option, I get following:

      [java] defaults: Error: unable to open './flex-config.xml'

      What is wrong?

        • 1. Re: Building with Ant
          I wasn't able to reproduce the first error you got. But the second error happens for me.
          Somehow, invoking mxmlc.jar from a directory other than the flex frameworks directory leads to an error where it's looking for files relative to flex frameworks.

          I got around this by specifying a dir to invoke the VM in.

          <property name="flex.dir" value="c:\flex\sdk" />
          <property name="flex.mxmlc.jar" value="${flex.dir}/lib\mxmlc.jar" />
          <java jar="${flex.mxmlc.jar}" dir="${flex.dir}/frameworks" fork="true">
          <arg line="-file-specs ${src.dir}/${app.name}.mxml"/>