idonaldson
idonaldson

Reputation: 475

Building Flex project with Ant. "The class not found in jar file: mxmlc.jar"

We've been tirelessly working on trying to catch up on our deployment that was due on Tuesday, so now that we have reached a point of deploying our application, Ant seems to be having difficulties with the mxmlc.jar.

We've tried searching most of this morning on what is going on, but have come up empty. Most of the questions i've asked on here, have an answer that works, so here I am once again.

When trying to run our Ant file I get a these error messages:

BUILD FAILED
C:\workspace\brp\script\build.xml:122: The following error occurred while executing this line:
C:\workspace\brp\script\build.xml:99: The class not found in jar file: mxmlc.jar

The resulting lines of code from that are:

<target name="mxml_compile">
        <mxmlc file="${flex.src.dir}/${proj.name}.mxml"
            keep-generated-actionscript="false"
            output="${build.dir}/${proj.name}.swf">
            <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
            <source-path path-element="${FLEX_HOME}/frameworks" />
        </mxmlc>

with line 122 being the call to mxml_compile.

The development environment is

We usually do a deployment every two weeks, and nothing other than some java side functionality and quite a few UI changes have been made. We are at a loss as far as where to go from here.

I've tried copying the flexTasks.jar from the sdk file to the source directory that ant is using, as I did find a post somewhere that said that could solve the problem, however it didn't change a thing.

Any thoughts?

Upvotes: 1

Views: 3470

Answers (1)

shameer salim
shameer salim

Reputation: 11

I faced the error and I realized that it was because of two mistakes. 1. My project sdk was 4.6.0, but my flex.properties was referring 4.1.0. I changed the sdk in flex.properties to 4.6.0

  1. I had copied flextasks.jar from 4.1.0/ant directory to my project home/lib. I replaced it with the jar from 4.6.0/ant directory. And then the problem got resolved

Upvotes: 1

Related Questions