I have developed an desktop application entirely in java.
Currently it is console based, but i am planning to have a UI for the same in Adobe Flex.
I wanted to know how do I communicate between the two, ie call methods that are defined in my java classes from AIR and return results to Adobe AIR.
There is no server involved.
I want to keep Adobe AIR as front end and Java as back end which will take care of the business logic .
Thanks and Regards,
The best way is probably to use the NativeProcess APIs available in AIR 2 (now in Beta).
Next, would be to use sockets to communicate between the two processes. In AIR 1.5, it is difficult to guarantee that both processes are running, at least when controlling thins from the AIR side rather than the Java side. In AIR 2, you can start other processes, so this is also easier.
There are some 3rd party tools, like Merapi, that help you pass objects between Java and AIR, too.