64 Bit Eclipse: Linux Installation, including PDT, WTP (WST), ATF, and MySQL (SQL Explorer Plugin)

Posted by on Apr 12, 2008 in Eclipse, Programming, Technology34 comments

Eclipse SDKUpdate, 16/01/09: This tutorial has been superseded by “Full 64 Bit (or 32 Bit) Web Development and PHP/MySQL IDE with Eclipse 3.4 Ganymede and PDT 2” which covers the latest versions of Eclipse (Ganymede – 3.4) and PDT (2.x).

NOTE, 04/08/08: This tutorial covers Eclipse Europa. If you would like to install the latest version of Eclipse 3.4 Ganymede, with PDT and SQL Explorer, take a look at my latest Tutorial: “64 Bit Eclipse 3.4 (Ganymede) IDE with PDT and SQL Explorer – Full PHP/MySQL Web Application IDE“.

I had tried once before to install the x64 (64 Bit) version of Eclipse IDE, about 8 months ago, but found it to be somewhat buggy and unstable. In the interim, I’ve been using the 32 Bit version of Eclipse PDT for my development stuff. Earlier this year (21/02/08) a new version of Eclipse 64 Bit was released, so I gave it a go today. So far, so good!

Unfortunately, there’s no 64 Bit PDT all-in-one, but I managed to install a 64 Bit equivalent by cobbling together the relevant packages available by using the Eclipse Update Manager system, after initially installing the latest version of Eclipse Classic 3.3.2 64 Bit.

I wanted to keep everything (or as much as possible) 64 Bit, so I also download and installed the 64 Bit JRE, which can be downloaded here (or use the direct link to the bin file). The method for installing the 64 Bit JRE is the same as the 32 Bit version – after the file downloaded to my desktop, I opened up a new Terminal Window (Applications -> Accessories -> Terminal), traversed to the directory I wanted to install it into, moved the file, made it executable, and ran it to install:

cd /usr/java
sudo mkdir 64
cd 64
sudo mv ~/Desktop/jdk-6u5-linux-x64.bin /usr/java/64/
sudo chmod a+x jdk-6u5-linux-x64.bin
sudo ./jdk-6u5-linux-x64.bin

If the “java” directory doesn’t exist, it needs to be created first:

sudo mkdir /usr/java

listing the directory

ls

should return

jre1.6.0_05

which is the directory containing the necessary Java binaries.

As with my previous 32 Bit installation, I wanted Eclipse to be installed in the /opt directory:

cd /opt
sudo mv ~/Desktop/eclipse-SDK-3.3.2-linux-gtk-x86_64.tar.gz /opt
sudo tar -zxvf eclipse-SDK-3.3.2-linux-gtk-x86_64.tar.gz

then rename the eclipse directory:

sudo mv eclipse eclipse64

I also needed to get the newly installed Eclipse to run with the newly installed JRE – by default, the eclipse executable in the directory will try and detect Java and use whatever it finds, so I created a shell script:

cd eclipse64
sudo gksu gedit eclipse.sh

containing the following:

#!/bin/bash
PATH=/usr/java/64/jre1.6.0_05/bin:$PATH
/opt/eclipse64/eclipse

Now instead of running the eclipse executable, I run eclipse.sh (make sure it’s executable)

sudo chmod 755 eclipse.sh

before running

/opt/eclipse64/eclipse.sh

PDT and WTP Plugins

The first time I ran the new 64 Bit version, everything went well – it was fast, and seemed stable, so I went ahead and started installing all the additional plugins I needed (and still need…). Goto Help -> Software Updates -> Find and Install, and select “Search for new features to install”.Click on “New Remote Site” for each of the following:

  • Name: PDT, URL: http://download.eclipse.org/tools/pdt/updates/
  • Name: WTP, URL: http://download.eclipse.org/webtools/updates/
  • Name: GEF, URL: http://www.eclipse.org/gef/updates/
  • Name: EMF, IRL: http://www.eclipse.org/modeling/emf/updates/

Eclipse Update Manager Add Remote Site

Actually, there are only a couple of components required from the GEF (Graphical Editing Framework) and EMF (Eclipse Modeling Framework) packages to satisfy dependencies – WTP (Web Tools Platform) requires a package from GEF, and GEF from EMF…

After adding these, click on Finish – the Update Manager will then query any mirrors for the latest versions of the plugins. Once it has finished, a dialog appears, where it is possible to select the plugins to download and install. First, I selected PDT – the Update Manager then informed me that PDT requires files from WTP, so I tried clicking the “Select Requires” button, hoping that it would sort out the dependencies on my behalf. Unfortunately, nothing happened… So, I selected WTP manually, then expanded GEF -> Eclipse SDK R3.3.1 and Selected Graphical Editing Framework 3.3.1v20070814, then expanded EMF -> EMF SDK 2.3.2 and selected Eclipse Modeling Framework (EMF) – org.eclipse.emf.ecore 2.3.2v200802051830… I could then click “Select Required” to get the last few residual required dependencies… Phew…

Eclipse Update Manager Select Updates

Actualy, it still bugged me for dependencies for Java Persistence API contained in WTP, but by that stage I really couldn’t be arsed going through the process of adding more stuff to the Update Manager and potentially having to search for further dependencies, so I just deselected the three Java Persistence API files contained in WTP.

OK, with the dependencies sorted, I clicked Next, accepted the agreements, finished, and went to make, and drink a brew (that’s Tea) while the Update Manager downloaded and installed the requested stuff.

MySQL: SQL Explorer Plugin

Eclipse SQL Explorer LogoOnce everything had downloaded and installed, I restarted Eclipse. Everything looked good! Great, in fact. But I also wanted to install a few more plugins, including the MySQL SQL Explorer Plugin – which additionally requires, and depends on Eclipse DTP (Data Tools Project). Eclipse DTP has to be downloaded and installed manually, since there is no automated Update Site. So, I downloaded dtp_1.5.2_022008.zip to my Desktop, and set about extracting and installing the files:

cd ~/Desktop
mkdir DTP
mv dtp_1.5.2_022008.zip DTP
cd DTP
unzip dtp_1.5.2_022008.zip
cd eclipse
sudo cp -R features plugins /opt/eclipse64

If Eclipse is open, restart it. With the DTP installed, I could set about installing the SQL Explorer Plugin. The instructions for installing and configuring the SQL Explorer Plugin can be found in my previous article – Eclipse PDT and MySQL – SQL Explorer Plugin, since I don’t want to regurgitate information, just follow the link if you need to install it, and come back when it’s done.

Note: Actually, now I had the DTP installed, I could download and install the additional Java Persistence API in WTP! Same method: Update Manager, select WTP etcetera, etcetera…

ATF: AJAX Framework Toolkit

Script.aculo.usOnce the SQL Explorer Plugin was installed, I had one final plugin – ATF (the AJAX Toolkit Framework). This can be downloaded as a Site Archive, and the zip file added to Eclipse’s Update Manager. Once downloaded, I opened the Update Manager in Eclipse (Help -> Software Updates -> Find and Install), and clicked on “New Archived Site”, to add a new locally archived site, calling it ATF, and pointing it to the freshly downloaded atf-incubation-SiteArchive-0.2.3M4-v200709141050.zip file. I discovered, however, that the site.xml file contained within the zipped site archive is somewhat out of date and the pointers within are directed to the wrong download locations, so I had to manually locate the additional dependent plugins – Mozilla XULRunner, and Mozilla JS. They can both be added as New Remote Sites to the Update Manager, by clicking on the “New Remote Site” button, and adding the following information:

  • Name: Mozilla JS, URL: http://ftp.mozilla.org/pub/mozilla.org/js/eclipse/
  • Name: XULRunner, URL: http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.1.3/contrib/eclipse/

The previously used EMF plugin is also required to satisfy a couple of dependencies, so I selected the ATF, Mozilla JS, XULRunner, and EMF plugins from the list, and clicked Finish. Once the “updates” were found, I selected XULRunner, Mozilla JS, ATF (I deselected the ATF -> Mozilla JS component though, since an updated version was to be downloaded and installed from the Mozilla Server), and also selected the required EMF components. Click through Next etc. to download and install. Once completed, I restarted Eclipse.

In the Window -> Preferences menu by the way, AJAX toolkits such as Script.aculo.us can be added to the ATF module.

Et Voila! I now have a working Eclipse 64 Bit version up and running! Finally!

Oh, if you want a desktop icon, just create a file on your Desktop called Eclipse.desktop,

cd ~/Desktop
gedit Eclipse.desktop

and add the following:

[Desktop Entry]
Categories=;
Encoding=UTF-8
Exec=/opt/eclipse32/eclipse.sh
Hidden=false
Icon=/opt/eclipse64/icon.xpm
Icon[en_US]=/opt/eclipse64/icon.xpm
Name=Eclipse
Name[en_US]=Eclipse
Terminal=false
Type=Application
Version=1.0

Tags: , , , , , , , ,