• Decrease font size
  • Reset font size to default
  • Increase font size
Banner
Merapi Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Can we launch an air application from java? (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Can we launch an air application from java?
#307
gauss (User)
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Can we launch an air application from java? 1 Year, 3 Months ago Karma: 0  
Hi everybody:

I´m trying to launch an air application from a java applet because my applet needs to pass the control to the air app and when air finishes, get back the control to the applet.


Basically, the flow would be:

1. The java applet creates a xml file with some data.
2. The java applet launches (in some way) the air app and passes it the path of the file
3. The air app takes the file and display it in a window. The user makes some tranformations on it and releases the file.
4. The air app finishes
5. In some way the control is back to the java applet and it continues manipulating the file.

Any suggestions???

Thanks in advance
 
Logged Logged  
  The administrator has disabled public write access.
#311
shadowfist (User)
Posts: 15
graphgraph
User Offline Click here to see the profile of this user
Re:Can we launch an air application from java? 1 Year, 3 Months ago Karma: 0  
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).
 
Logged Logged  
  The administrator has disabled public write access.
#312
gauss (User)
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Re:Can we launch an air application from java? 1 Year, 3 Months ago Karma: 0  
Ok shadowfist
I'll try it

Thanks a lot¡¡¡
Bye
 
Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop