Install Aptana Studio on Ubuntu


Aptana Studio 3 is a popular open source integrated development environment (IDE) and professional web development tool for HTML, CSS, JavaScript, Ruby, Rails, ColdFusion, PHP and Python.

To install Aptana Studio 3 and the pre-requisite supported Oracle Sun JDK on Ubuntu 11.10, follow these steps:

1. Preparation

  • Determine whether your Ubuntu installation is 32 or 64 bit.
    $ file /sbin/init
  • Download  the latest version of Oracle Sun JDK from http://www.oracle.com, look for the tar.gz file. I’ve downloaded this: jdk-7u17-linux-x64.tar.gz
  • Download Aptana Studio 3 standalone version 32 or 64 bits from http://www.aptana.com and save to ~/Downloads
  • Determine if java is installed
    $ java -version
  • If openJDK is already installed, then removed it using this command:
    $ sudo apt-get purge openjdk-\*
  • Create the destination folder for the Oracle Sun JDK
    $ sudo mkdir -p /usr/lib/jvm

2. Install Sun JDK

Extract the compressed tar.gz file:

$ cd ~/Downloads
$ tar -xvzf jdk-7u17-linux-x64.tar.gz

Explanation of tar options:

  • f: this must be the last flag of the command, and the tar file must be immediately after. It tells tar the name and path of the compressed file.
  • z: tells tar to decompress the archive using gzip
  • x: tar can collect files or extract them. x does the latter.
  • v: makes tar talk a lot. Verbose output shows you all the files being extracted.

Move it to /usr/lib/jvm:
$ sudo mv ./jdk1.7.0_17 /usr/lib/jvm/jdk1.7.0_17

Configure Ubuntu to use the downloaded Oracle Sun JDK:

$ sudo update-alternatives –install “/usr/bin/java” “java” “/usr/lib/jvm/jdk1.7.0_17/bin/java” 1
$ sudo update-alternatives –install “/usr/bin/javac” “javac” “/usr/lib/jvm/jdk1.7.0_17/bin/javac” 1
$ sudo update-alternatives –install “/usr/bin/javaws” “javaws” “/usr/lib/jvm/jdk1.7.0_17/bin/javaws” 1

The command takes this form: sudo update-alternatives –install link name path priority

update-alternatives  creates, removes, maintains and displays information about the symbolic links comprising the Debian alternatives system.

–install link name path priority  Add  a group of alternatives to the system.
link is the generic name for the master link,
name is the name of its symlink in the alternatives  directory,  and
path  is  the  alternative  being introduced for the master link

Correct the permissions of the executables:

$ sudo chmod a+x /usr/bin/java
$ sudo chmod a+x /usr/bin/javac
$ sudo chmod a+x /usr/bin/javaws

Confirm installation and java version
$ java -version

You should see the following:

java version “1.7.0_17”
Java(TM) SE Runtime Environmnet (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

3. Install Aptana Studio 3

$ cd ~/Downloads
$ sudo unzip Aptana_Studio_3_Setup_Linux_x86_64_3.3.2.zip -d /opt/Aptana/

convert icon.xpm to icon.png and save it to ~Downloads/Aptana_Studio_3/
$ sudo cp icon.png /opt/Aptana/

Create the Aptana Launcher

$ sudo nano /usr/share/applications/Aptana.desktop

Add the following to the Aptana.desktop file:

[Desktop Entry]
Version=3
Type=Application
Terminal=false
StartupNotify=true
Icon=/opt/Aptana/icon.png
Name=Aptana Studio
Comment=Programming IDE
Exec=/opt/Aptana/AptanaStudio3
Categories=Application;Development;

Control X to exit and Yes to save this file.

Reboot Ubuntu
Launch Aptana Studio
Right click Aptana Studio icon on left menu and select Keep in Launcher

That’s all. You have now successfully installed Aptana Studio 3 and can access it from the Ubuntu Quick Launcher.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s