I have a program in AIR 2.6 for 开发者_C百科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 chmod
at the command line
Or if using Flex/Flash Builder, you can right click on the file and choose properties. Then set the execute bit
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.
精彩评论