简体   繁体   English

MXMLC和64位JRE

[英]MXMLC and 64bit JRE

Are there any workarounds to get the Flex compiler to work with a 64bit JRE? 是否有任何变通方法可以使Flex编译器与64位JRE一起使用? If I use an MXMLC task in an Ant buildfile in Eclipse it works fine but if I try to use MXMLC from the command line (or try the Run... command from FDT in Eclipse) it fails, telling me ... 如果我在Eclipse中的Ant构建文件中使用MXMLC任务它可以正常工作但如果我尝试从命令行使用MXMLC(或尝试从Eclipse中的FDT运行...命令)它会失败,告诉我......

"Error loading: C:\\Program Files\\Java\\jrrt-1.6.0\\jre\\bin\\jrockit\\jvm.dll" “加载时出错:C:\\ Program Files \\ Java \\ jrrt-1.6.0 \\ jre \\ bin \\ jrockit \\ jvm.dll”

(this is with a 64bit JRockit runtime but that shouldn't matter). (这是一个64位的JRockit运行时,但这无关紧要)。

There is currently no support for using the Flex compiler with the 64 bit JRE. 目前不支持将Flex编译器与64位JRE一起使用。 Instead, have the compiler use a 32 bit JRE. 相反,让编译器使用32位JRE。

To do so, you'll need to edit the jvm.config file located in FLEX_HOME\\bin. 为此,您需要编辑位于FLEX_HOME \\ bin中的jvm.config文件。 Within jvm.config, set java.home to the location of a 32bit JRE. 在jvm.config中,将java.home设置为32位JRE的位置。 If you don't already have a 32bit JRE, download it. 如果您还没有32位JRE,请下载它。

Example: 例:

java.home=C:/Program Files (x86)/Java/jre6

If you like this answer, please click the up arrow to the left. 如果您喜欢这个答案,请点击左侧的向上箭头。

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. 您可以使用任何64位Java,但是您需要一个批处理文件而不是exe文件来调用没有32位存根的Java。 Create the bat files in the flex\\bin folder. 在flex \\ bin文件夹中创建bat文件。

mxmlc.bat: 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: 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. 冲洗并重复所有其他flex * .exe文件。

Also add java options as needed, eg 还可以根据需要添加java选项,例如

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

Now use 现在用

  • mxmlc.bat instead of mxmlx.exe mxmlc.bat而不是mxmlx.exe
  • compc.bat instead of compc.exe compc.bat而不是compc.exe
  • ... ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM