You can use Merapi to communicate between Java and AIR (e.g. pass file path from Java to AIR, issue command from AIR to Java).
so given the above you could use Java code like the following to start your AIR app:
| Code: |
String appPath = System.getProperty("user.dir") + System.getProperty("file.separator") + AIR_APP_NAME + ".exe";
File f = new File(appPath);
if (f.exists()) Process process = Runtime.getRuntime().exec(new String[] {appPath});
|
Then inside the AIR app when it starts immediately sends a command to Java (which is listening using Merapi) that it has started, at which point Java passes the file path to AIR.
When AIR is done, send a command back to Java telling it this and then quits (or whatever).