MXMLC and 64bit JRE

后端 未结 2 525
南笙
南笙 2020-12-08 01:16

Are there any workarounds to get the Flex compiler to work with a 64bit JRE? If I use an MXMLC task in an Ant buildfile in Eclipse it works fine but if I try to use MXMLC fr

2条回答
  •  情歌与酒
    2020-12-08 01:29

    You can use any 64 bit Java but you need a batch file instead of the exe file to invoke java without the 32 bit stub. Create the bat files in the flex\bin folder.

    mxmlc.bat:

    @echo off
    for  %%i in (%0) do set FLEX_HOME=%%~dpi..
    java -jar "%FLEX_HOME%\lib\mxmlc.jar" +flexlib="%FLEX_HOME%/frameworks" %*
    

    compc.bat:

    @echo off
    for  %%i in (%0) do set FLEX_HOME=%%~dpi..
    java -jar "%FLEX_HOME%\lib\compc.jar" +flexlib="%FLEX_HOME%/frameworks" %*
    

    Rinse and repeat for all other flex *.exe files.

    Also add java options as needed, e.g.

    java -Xmx2000m -XX:MaxMetaspaceSize=512m -jar "%FLEX_HOME%\lib\... ...
    

    Now use

    • mxmlc.bat instead of mxmlx.exe
    • compc.bat instead of compc.exe
    • ...

提交回复
热议问题