Hi David,

You should be able to link against the mxmlc jar directly and invoke  
it's main class...

flex2.tools.Compiler

Now make sure you have the following classes...

xercesPatch.jar
asc.jar
xercesImpl.jar
xmlParserAPIs.jar
afe.jar
aglj32.jar
rideau.jar
batik-awt-util.jar
batik-bridge.jar
batik-css.jar
batik-dom.jar
batik-ext.jar
batik-gvt.jar
batik-parser.jar
batik-script.jar
batik-svg-dom.jar
batik-svggen.jar
batik-util.jar
batik-transcoder.jar
batik-xml.jar mm-velocity-1.4.jar
commons-collections.jar
commons-discovery.jar
commons-logging.jar
license.jar
swfkit.jar
flex-messaging-common.jar
mxmlc_ja.jar

They're available in the $FLEX_BUILDER_3/sdks/3.0.0/lib/ folder of  
your flex installation.

Cheers,
Sam

On Oct 13, 2007, at 6:57 PM, David Holroyd wrote:

> Since I generate all sorts of ActionScript code, its handy to check  
> that
> the generated code compiles from my JUnit tests.
>
> Just exec()'ing compc from the unit test (and paying the cost of  
> another
> JVM startup) for every test slooow.
>
> I could (subject to neutralising those System.exit() calls) just  
> invoke
> compc's main() from the unit test, but I'd still have the compiler be
> doing all sorts of linking and file generation etc. that I don't  
> really
> need.  Having the syntactic and semantic checks alone would do.
>
> Has anyone seen descriptions of directly invoking the flex compiler  
> APIs
> from Java?
>
>
> ta,
> dave
>
> -- 
> http://david.holroyd.me.uk/
>
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org


_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to