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.
You will get this error if the file you are attempting to execute doesn’t have the execute bit set.
You can either use
chmodat the command lineOr if using Flex/Flash Builder, you can right click on the file and choose properties. Then set the execute bit