Air NativeProcess java
I want to interact with a .jar-file in my AIR-project. I am using the NativeProcess feature in AIR2 for this, but it seems like I can't just define 'myJavaFile.jar' as the executable.
On Windows, you can give 'java.exe' as the executable, the problem is Mac can't handle .exe-files.
So my question is: how can I use .jar-files with the NativeProcess feature in AIR2. Or maybe there is an other solution to 开发者_StackOverflow中文版communicate with a .jar-files in AIR / AS3?
Many thanks in advance!
I figured it out. You can use var file:File = new File("/usr/bin/java");
and pass parameters to the Java-file with a Vector of arguments. E.g.
var arguments:Vector.<String> = new Vector.<String>;
arguments.push("-jar");
精彩评论