AIR 中的错误 #3219 NativeProcess
我有一个适用于 Windows 和 Mac Os 平台的 AIR 2.6 程序。使用 NativeProcess 类来执行我已包含在项目中的本机应用程序。
在 Windows 中一切正常,但在 Mac 中则不行。
代码是:
var executable:File = File.applicationDirectory.resolvePath('bin/mac/convert')
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartupInfo.executable = executable;
nativeProcessStartupInfo.arguments = params;
nativeProcessStartupInfo.workingDirectory = workingDirectory;
if(NativeProcess.isSupported)
start(nativeProcessStartupInfo);
错误位于 start(...) 行:
Error #3219: The NativeProcess could not be started. 'launch path not accesible'.
Executable var is a File with path in debug=/Users/awakening/Documents/workspace/flashbuilder/SDTDV/bin-debug/bin/mac/convert
它说存在=真。发布版本也有同样的问题。
预先感谢您。
I have a program in AIR 2.6 for Windows and Mac Os platform. Use NativeProcess class to execute native apps that i have included in the project.
In Windows all work fine, but in Mac dont work.
The code is:
var executable:File = File.applicationDirectory.resolvePath('bin/mac/convert')
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartupInfo.executable = executable;
nativeProcessStartupInfo.arguments = params;
nativeProcessStartupInfo.workingDirectory = workingDirectory;
if(NativeProcess.isSupported)
start(nativeProcessStartupInfo);
The error is in start(...) line:
Error #3219: The NativeProcess could not be started. 'launch path not accesible'.
Executable var is a File with path in debug=/Users/awakening/Documents/workspace/flashbuilder/SDTDV/bin-debug/bin/mac/convert
It says that exists=True. Same problem with release build.
Thanks you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您尝试执行的文件没有设置执行位,您将收到此错误。
您可以在命令行中使用
chmod
,或者如果使用Flex/Flash Builder,您可以右键单击该文件并选择属性。然后设置执行位
You will get this error if the file you are attempting to execute doesn't have the execute bit set.
You can either use
chmod
at the command lineOr if using Flex/Flash Builder, you can right click on the file and choose properties. Then set the execute bit
你是说jar文件吗?要运行 JAR 文件,我认为您需要使 JAVA 成为可执行文件并向其传递 jar 文件的参数。
Do you mean jar file? To run a JAR file I think you need to make JAVA the executable and pass it the argument of the jar file.