apache-flex - AIR 2.0 NativeProcess 不受支持问题

标签 apache-flex process air native exe

我构建了一个使用 nativeProcess 来打开 exe 的应用程序。

Flex Builder 3 中的应用程序运行没有错误。

然后,当我将应用程序 AIR 导出为 .air 并将应用程序安装到开发人员电脑或其他电脑中时,问题就出现了。

当我按下按钮打开 .exe 时,出现消息“不支持 native 进程”。

我使用的 main.mxml 中的代码:

if (NativeProcess.isSupported)
            {
                var file:File = new File("app:/config/AbrirAplicacion.exe");
                var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
                nativeProcessStartupInfo.executable = file;

                process = new NativeProcess();
                process.start(nativeProcessStartupInfo);
                process.standardInput.writeUTFBytes(textReceived.text+"\n");
                process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData);
                process.addEventListener(ProgressEvent.STANDARD_INPUT_PROGRESS, inputProgressListener);
            }
            else
            {
                textReceived.text = "NativeProcess not supported.";
            }

对我做错了什么有什么想法吗?

最佳答案

NativeProcess 仅在应用程序编译为 native 二进制文件(而非 .air 安装程序)时可用。

关于apache-flex - AIR 2.0 NativeProcess 不受支持问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3138672/

相关文章:

sqlite - 从Adobe AIR应用程序更新本地sqlite数据库

apache-flex - 如何在AS3中将字符串保存到文件中?

apache-flex - 我应该在我的grails应用中将crossdomain.xml放在哪里

apache-flex - 在 Actionscript 3 (Flex) 中扩展数组

actionscript-3 - 闪存 AS3 :How to save levels of AIR mobile game on local machine?

apache-flex - Flash/Flex 中 Speex 编解码器的 API

apache-flex - 如果按钮有焦点,如何让按钮不会在空格键上触发?

java - 正确设置工作路径

c - execve '/bin/sleep'命令卡住

windows - Windows查看进程环境变量