I am trying to execute a sample test to compile a simple mxml
application from Java using the flex-compiler-oem.jar.

When the following line is executed :  long result =
application.build(true);
i get this error message:

Exception in thread "main" java.lang.NoSuchMethodError:
flex2.compiler.API.usePathResolver(Lflex2/compiler/common/SinglePathReso\
lver;)V

I seems that i have a class missing...

Code :

import flex2.tools.oem.*;
import java.io.*;

public class Main {


     public static void main(String[] args) {
         try {
             Application application = new Application(new
File("testApp.mxml"));
             application.setOutput(new File("TestApp.swf"));
             long result = application.build(true);

         } catch (Exception ex) {
             ex.printStackTrace();
         }
     }
}

testApp.mxml code (should not have any impact with my stacktrace):

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute">
     <mx:Panel x="442" y="204" width="250" height="200"
layout="absolute">
         <mx:Button x="68" y="128" label="Button"/>
     </mx:Panel>
</mx:Application>

I have included the following library in my project :
flex-compiler-oem.jar
mxmlc.jar
compc.jar

Please help :)


Reply via email to