Hello World! – Adobe Air on Ubuntu and Windows

This article is to help fellow web developers get started with working on Adobe AIR! Using Adobe AIR, you will be able to create desktop applications which are cross-operating system using just HTML, JS and a bit of XML.

Adobe Air works great on Windows, Linux, Mac and hopefully a lot of future operating systems and mobile devices. If you get an application working, it should work and display exactly as it does across all the other operating systems as all AIR installations use WebKit. This article will give you an insight into how I got it working on Windows and Linux. We need Abobe AIR SDK to develop and build AIR applications. You can get Adobe AIR SDK from this link here.

Setting up AIR SDK on Ubuntu
1) Get Adobe AIR SDK from http://adobe.com/go/getairsdk (Choose Linux)
2) Extract contents of the file into a location that you prefer
3) Pick the adl and adt files and place them in your bin directory on your machine OR set a path to the bin folder so that these files are accessible
4) Once you have it all setup, you should be able to run adl on your terminal and get a message back instead of the standard “command not found”
5) You will have to save both of the files (AIRHello.xml and AIRHello.html into a folder)
6) On the terminal, go into the folder where the files are saved and run “adl AIRHello.xml” and that’s it you

Setting up AIR SDK on Windows
1) Get Adobe AIR SDK from http://adobe.com/go/getairsdk (Choose Windows)
2) Extract contents of the file into a location that you prefer
3) Go to Start > My Computer (Right click Properties) > Advanced Tab > Environment Variables > Path > Edit and add the path to your bin folder
4) Once you have it all setup you should be able to run adl on your command line and get a message back instead of the standard “command not found”
5) Make sure that on the command line if you type “path” you get to see the new entry.
6) You will have to save both of the files (AIRHello.xml and AIRHello.html into any folder)
6) On the command line browse to the folder where files are saved and run “adl AIRHello.xml” and that’s it!

AIRHello.xml

<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/1.0">
<id>uk.co.webdigi.AIRHello</id>
<filename>AIRHello</filename>
<name>Hello World</name>
<description>This is a sample Adobe AIR application.</description>
<version>1.0</version>
<initialWindow>
<content>AIRHello.html</content>
<title>Hello by Webdigi</title>
<systemChrome>standard</systemChrome>
<transparent>false</transparent>
<visible>true</visible>
<minimizable>true</minimizable>
<maximizable>true</maximizable>
<resizable>true</resizable>
<width>500</width>
<height>500</height>
<x>150</x>
<y>150</y>
<minSize>300 300</minSize>
<maxSize>800 800</maxSize>
</initialWindow>
</application>

AIRHello.html


AIRHello
<div>
<h2>Hello World</h2>
</div>

This should get you started on working with Adobe AIR! You can easily create AIR applications using just HTML, Javascript and XML, all tools that web developers regularly use. You can do more advanced stuff like system tray alerts, drag and drop, sounds, file access and many more stuff that you can’t do on a traditional web browser.

Also read...

Comments

  1. Sam Johnson said on :

    Also see 30+ adobe air apps in action. From finance to productivity to music etc etc

    mashable.com/2008/06/06/adobe-air-applications/

  2. ggruschow said on :

    Thanks a lot!
    I keep thinking I should look at AIR for some apps I’d like to develop, and seeing a huge mess of XML and HTML just to do the standard “Hello World” gives me enough pause that I can put it off again. Just to validate though, I tried some of the sample apps, and the number of mandatory dialogs users would have to go through just to get started is a nice confirmation that I don’t need to be using this anytime soon. Finally, I got to use some of the apps. I haven’t used anything so quick, responsive, and natural feeling since Java 1.0.

    It’s great posts like these that really help me improve my planning and boost my productivity.

  3. sh0rtwave said on :

    @ggruschow
    It’s worth mentioning that this approach (the “huge mess of XML and HTML” is NOT the only way of approaching AIR development.
    There’s also MXML which lets you build UIs using standard components, (and then you can customize from there).
    MXML is essentially a large set of compiler macros. It seems like a lot at first glance, but it’s actually very well done.
    What do you mean by “mandatory dialogs”?

  4. poundy said on :

    What is also interesting is, you can make your existing website air capable. You can check if your website is being viewed as an air application by checking if air.runtime is present. If this variable is set you can do all kind of things with JS to show notifications, alerts, drag n drop, etc.. etc.. (without any flash just JS ofcourse!)

  5. Paone said on :

    I followed as above. When i type “$ java -version” it gives me
    java version “1.6.0_24”
    Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
    Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)
    But when i run “$ adl airhello.xml” It says
    Run time not found. Please help.

  6. Pingback: Web Development articles, tutorials, help » Blog Archive » Hello World! – Adobe Air on Ubuntu and Windows

  7. Ronda Akard said on :

    just right publish but your site loading very sluggish :-(.

Comments are closed.