10/11/2008

Build Flex SDK in Ubuntu 8.X

1、安装Java环境  
(1)安装sun-java6-jre/sun-java6-jdk

sudo apt-get install sun-java6-jre
sudo apt-get install sun-java6-jdk

(2)设置当前默认的java解释器:
sudo update-alternatives --config java

执行后会出现类似如下的画面:
There are 2 alternatives which provide `java'.
Selection Alternative
-----------------------------------------------
*+ 1 /usr/lib/jvm/java-6-sun/jre/bin/java
2 /usr/bin/gij-wrapper-4.1
Press enter to keep the default

  • , or type selection number:
  •   输入有包含 "sun" 的行的前面的数字。如上面显示,则输入1,然后回车确定。    

    (3)编辑/etc/environment,加入下面两行:
    CLASSPATH=.:/usr/lib/jvm/java-6-sun/lib
    JAVA_HOME=/usr/lib/jvm/java-6-sun

    sudo gedit /etc/jvm
    将文件中的/usr/lib/jvm/java-6-sun
    这一行填入到配置块的顶部
    2. 安装flex Sdk
    安装Adobe FLEX 3.0 SDK 从下面的地址http://www.adobe.com/go/flex3_sdk下载Adobe FLEX 3.0 SDK,我下载的是flex_sdk_3.2.0.3562_mpl.zip
    #mkdir /home/edwin/flexSdk
    #cd /home/edwin
    #unzip Desktop/flex_sdk_3.2.0.3562_mpl.zip -d flexSdk/
    #chmod -R 777 flexSdk/bin
    3 测试
    #gedit hello.as
    #/home/edwin/flexSdk/mxmlc hello.as
    #firefox hello.swf


    No comments: