This content has been marked as final. Show 5 replies
The MXML compiler is written in Java and you should be able to call entry points like flex2.tools.Compiler.main() in mxmlc.jar, passing it command-line arguments. This is identical to running mxmlc on the command line.
There are other "OEM" APIs in compiler-oem.jar which are object-oriented and give you more control over the compilation process. (FlexBuilder uses these.) Using these APIs require an OEM license, which costs a lot.
The VirtualLocalFile class can be used to generate and compile MXML files on the fly. I'm not sure whether something similar exists for SWCs.
flex-compiler-oem.jar is included into flex3 distribution. Did it mean a public API ?
Yes, flex-compiler-oem.jar is included in the public distribution of the Flex SDK. You may find it under the <SDK ROOT>/lib folder.
I can'f find any documentation for a compiler API. Is this Adobe have it in public domain, or for a sale ?
Using this API requires an OEM license. For information on OEM licensing, please contact firstname.lastname@example.org