Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex Ant和Flex-4问题,找不到MXMLC.jar!_Apache Flex_Ant_Flex4 - Fatal编程技术网

Apache flex Ant和Flex-4问题,找不到MXMLC.jar!

Apache flex Ant和Flex-4问题,找不到MXMLC.jar!,apache-flex,ant,flex4,Apache Flex,Ant,Flex4,我将flex应用程序从flex 3.5更新为flex 4.0。 我们正在使用ant编译我们的项目,我们有一个mxmlc任务来处理flex部分。 升级后,我们的mxmlc任务中断 以下是任务定义: <taskdef resource="flexTasks.tasks"> <classpath> <pathelement path="${FLEX_HOME}/ant/lib/flexTasks.jar"/>

我将flex应用程序从flex 3.5更新为flex 4.0。 我们正在使用ant编译我们的项目,我们有一个mxmlc任务来处理flex部分。 升级后,我们的mxmlc任务中断

以下是任务定义:

<taskdef resource="flexTasks.tasks">
        <classpath>
            <pathelement path="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
            <fileset dir="${FLEX_HOME}/lib">
                <include name="**/*.jar"/>
            </fileset>
        </classpath> </taskdef>
我检查了${FLEX_HOME}/lib文件夹,可以在那里看到mxmlc.jar文件

以下是ant的详细输出:

build.xml:69: The class not found in jar file: mxmlc.jar
    at flex.ant.FlexTask.resolveClass(FlexTask.java:347)
    at flex.ant.FlexTask.executeInProcess(FlexTask.java:273)
    at flex.ant.FlexTask.execute(FlexTask.java:225)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.Main.runBuild(Main.java:758)
    at org.apache.tools.ant.Main.startAnt(Main.java:217)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
我感谢你对解决这件事的评论

谢谢,
-升级到ant 1.8解决了这个问题


编辑:Ant 1.8.1也有同样的问题,但在Ant 1.8.2中已修复。

我将此问题追溯到Adobe SDK zip文件,将解压内容保留在不允许我的hudson用户阅读内容的权限下。一旦我对安装的FLEX_HOME中的文件和目录做了一些chmods,一切都很好。

朋友

请从{FLEX HOME}\ant\lib目录复制最新的flexTask.jar文件并粘贴到ant\lib中

拉吉。


恩努斯
../locale/{locale}
日历样本
长生不老药样本
普劳泽
安全
设置包
顾客包袱
订单包
../bin debug/Resources\u en\u US.swf
ja_JP
../locale/{locale}
日历样本
长生不老药样本
普劳泽
安全
设置包
顾客包袱
订单包
../bin debug/Resources_ja_JP.swf

我也有这个问题。我发现$ANT_HOME/lib目录中有一个旧的flexTasks.jar。当我删除这个文件时,问题中的ANT配置对我有效。

我也有同样的问题,因为运行ANT的用户没有读取Flex sdk目录的权限。

有完全相同的问题,但ANT版本已经是1.8,chmod 777所有sdk文件,仍然不工作,知道吗?谢谢在代码建议中添加解释会使其更加有用。您应该稍微解释一下您的答案。
The class not found in jar file: mxmlc.jar
build.xml:69: The class not found in jar file: mxmlc.jar
    at flex.ant.FlexTask.resolveClass(FlexTask.java:347)
    at flex.ant.FlexTask.executeInProcess(FlexTask.java:273)
    at flex.ant.FlexTask.execute(FlexTask.java:225)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.Main.runBuild(Main.java:758)
    at org.apache.tools.ant.Main.startAnt(Main.java:217)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
<!-- CHANGE TO YOUR FLEX DIRECTORY //-->
<property name="FLEX_HOME" value="C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0"/>
<property name="APP_ROOT" value="myApp"/>

<taskdef resource="flexTasks.tasks" >
    <classpath> <pathelement path="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
        <pathelement path="${FLEX_HOME}/lib/flexTasks.jar"/> 
        <fileset dir="${FLEX_HOME}/lib"> 
            <include name="**/*.jar"/>
        </fileset> 
    </classpath>
</taskdef>

<target name="main">
    <antcall target="en_US"></antcall>
    <antcall target="ja_JP"></antcall>
</target>
<target name="en_US">
    <mxmlc>
        <locale>en_US</locale>
        <source-path>../locale/{locale}</source-path>
        <include-resource-bundles>calendarsample</include-resource-bundles>
        <include-resource-bundles>elixirsamplebar</include-resource-bundles>
        <include-resource-bundles>p1browzer</include-resource-bundles>
        <include-resource-bundles>security</include-resource-bundles>
        <include-resource-bundles>setupBundle</include-resource-bundles>
        <include-resource-bundles>customerBundle</include-resource-bundles>
        <include-resource-bundles>orderBundle</include-resource-bundles>
        <output>../bin-debug/Resources_en_US.swf</output>
    </mxmlc>
</target>
<target name="ja_JP">
        <mxmlc keep-generated-actionscript="false">
            <locale>ja_JP</locale>
            <source-path>../locale/{locale}</source-path>
            <compiler.library-path dir="${FLEX_HOME}/frameworks" append="false">
                <include name="libs" />
            </compiler.library-path>
            <include-resource-bundles>calendarsample</include-resource-bundles>
            <include-resource-bundles>elixirsamplebar</include-resource-bundles>
            <include-resource-bundles>p1browzer</include-resource-bundles>
            <include-resource-bundles>security</include-resource-bundles>
            <include-resource-bundles>setupBundle</include-resource-bundles>
            <include-resource-bundles>customerBundle</include-resource-bundles>
            <include-resource-bundles>orderBundle</include-resource-bundles>
            <output>../bin-debug/Resources_ja_JP.swf</output>
        </mxmlc>
    </target>