I don’t know really well the diference between AIR and FLEX, i do with Java tought,
My question is that I want to build an application to run in local mode, but maybe in the future I want it to be available trought the web,
The basic sequence diagram is the following:

So I want the client to connect to a server for login information, and for storing some data, and I don’t know wich one of the three technologies is the best..
Can you help me?
Thanks!
Flex is a platform for creating client-side applications. AIR is a “wrapper” to run Flex applications on desktop instead in browser. It gives you some possibilities like access to local file system.
Use Flex for client side and decide if you want it to run in browser, like a web page, or install on desktop with AIR. Don’t use Java for user interface if you can use Flex.
Use Java for server side application. You may be needing something like BlazeDS or GraniteDS for Flex-Java AMF communication.