Compiling Actionscript 3.0 on Debian Linux


I have written before bout Using Apache Flex SDK without Flash Builder.  In this post I will cover how to install Java and the Flex SDK on Debian Linux so you can build your Actionscript 3.0 applications.

Compiling Adobe Actionscript requires Oracle’s Java but Debian 9 ships with OpenJDK by default. In my experience Flex and Actionscript applications require Oracle’s JDK to build. You can install Oracle’s Java 8 JDK and compile your Actionscript projects on Debian stretch. To install Oracle’s java on Debian, download the JDK and accept Oracle’s license agreement. You can download java from Oracle with curl by setting the accept license header. The following bash snippet shows how to instal Java 8 and the Flex SDK on Debian Linux.

$ JDK_URL="http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz"
$ FLEX_SDK_URL="http://download.macromedia.com/pub/flex/sdk/flex_sdk_4.6.zip"
$ apt-get install java-package
$ curl -H "Cookie: oraclelicense=accept-securebackup-cookie" \
  "${JDK_URL}" \
  -o jdk-8u144-linux-x64.tar.gz;
$ make-jpkg jdk-8u144-linux-x64.tar.gz
$ sudo dpkg -i oracle-java8-jdk_8u144_amd64.deb
$ curl "${FLEX_SDK_URL}" -o flex_sdk_4.6.zip
$ mkdir -p ~/.local/lib
$ unzip flex_sdk_4.6.zip
$ mv flex_sdk_4.6 ~/.local/lib/

You should now have the Java JDK and the Flex SDK installed and be able to compile your Actionscript 3.0 applications on Debian Linux.