---
title: "Flex ant Task Problem"
author: "keren021"
date: "2011-10-18T17:34:00Z"
tags: ["Flex"]
categories: ["Web前端"]
slug: "flex-ant-task-problem"
draft: false
lastmod: "2011-10-18T17:34:00Z"
id: 1199474
url: "https://keren021.iteye.com/blog/1199474"
---

原文路径：
```java
http://stackoverflow.com/questions/1682705/flex-ant-task-problem
```


现象： 
```java
[mxmlc] java.lang.NoClassDefFoundError: flex2/tools/Compiler [mxmlc] Exception 
in thread "main" 
```



详细错误： 
```java
compile.main:
 dropping E:\c from path as it doesn't exist dropping 
E:\programs\flex-sdk\lib\mxmlc.jar from path as it doesn't exist 
[mxmlc] java.lang.NoClassDefFoundError: flex2/tools/Compiler  
[mxmlc] Exception in thread "main"    
[antcall] Exiting 
E:\svn\trunk\dev\modules\web\webapps\lpjserver\lpjserver-build.xml.
 BUILD FAILED 
```



 sdk3.2 window版本缺陷，解决方案： 1）sdk和Flex工程位于同一分区。 2）将“FLEX_HOME/ant/lib/flexTasks.jar”文件拷贝到“ANT_HOME/lib”。