Eclipse PDT IDE for PHP MySQL 32 Bit install on 64 Bit Ubuntu

Posted by Hodge on Feb 29, 2008 in Eclipse, Programming, Technology, Ubuntu14 commentsPrint This Post

Eclipse SDKPlease Note: This article is now deprecated in favour of “Full 64 Bit (or 32 Bit) Web Development and PHP/MySQL IDE with Eclipse 3.4 Ganymede and PDT 2″. Thanks!

Update 12/04/08: I have now successfully installed the x64 version of Eclipse – see 64 Bit Eclipse: Linux Installation, including PDT, WTP (WST), ATF, and MySQL (SQL Explorer Plugin) for a step by step guide, or continue reading this article if you want to install the 32 bit version.

32 Bit installation

I went through several different methods of installing the Eclipse IDE on my Ubuntu system. I tried the obvious first – installing via the Synaptic Package Manager, but found it a bit of a pain to install any plugin packages I downloaded (I also use WST and SqlExplorer in addition to PDT). So, I uninstalled, then tried the 64 Bit version of the SDK (which at the time was pretty buggy, and unstable), in the hope that I’d be able to plug in a 64 Bit version of the PDT, which I soon found doesn’t exist yet! So, I finally settled for installing the 32 Bit version of Eclipse PDT, which enabled me to install the plugins too.

In order to install and run this successfully, I first downloaded the 32 Bit Java Runtime Environment installer “Linux (self-extracting file)” from http://www.java.com/en/download/linux_manual.jsp (or direct link to the file), and saved the jre-6u3-linux-i586.bin to my desktop.

Once the file downloaded, I opened up a Terminal (Applications -> Accessories -> Terminal), and typed

cd /usr/java

(if the java directory doesn’t exist, it need to be created:

sudo mkdir /usr/java
cd /usr/java

I also wanted a 64 bit version of the JRE installing, so within the /usr/java directory, created two more sub directories:

sudo mkdir 32
sudo mkdir 64

then copied the newly downloaded JRE installation file from the desktop to the /usr/java/32 directory, and made the file executable:

cd 32
sudo mv ~/Desktop/jre-6u3-linux-i586.bin /usr/java/32/jre-6u3-linux-i586.bin
sudo chmod a+x jre-6u3-linux-i586.bin

then execute the binary:

sudo ./jre-6u3-linux-i586.bin

Accept the terms, and so on and so forth… When it says “Done”, it’s, well, done!

ls

should return:

jre1.6.0_03

Note: If you download a newer version of JRE, then you’ll need to change the above commands containing “jre-6u3-linux-i586.bin” to “jre-6u<version>-linux-i586.bin” where <version> is 3, 4, 5 etc.!

Now for Eclipse. I downloaded the latest version from http://download.eclipse.org/tools/pdt/downloads/ (the current stable version is R20080103) – I click on the link for the latest release, and downloaded the pdt-all-in-one-R20080103-linux-gtk.tar.gz file to the desktop. Once it finished, I went back to the terminal, and entered the /opt directory, moved the Eclipse package to the /opt directory, and extracted the new files:

cd /opt
sudo mv ~/Desktop/pdt-all-in-one-R20080103-linux-gtk.tar.gz /opt
sudo tar -zxvf pdt-all-in-one-R20080103-linux-gtk.tar.gz

This extracts the Eclipse IDE into a directory called, oddly enough, “eclipse”. However, I’m experimenting with the 64 bit version too, so I changed the directory name to eclipse32:

sudo mv eclipse eclipse32

As it was, Eclipse wouldn’t run, since it doesn’t know where to find the JRE I’d just installed, so, I had to create a small shell script in order for it to run correctly:

cd eclipse32
gksu gedit eclipse.sh

This opened up a text editor, with a blank file called “eclipse.sh”. The shell script is:

#!/bin/bash
PATH=/usr/java/32/jre1.6.0_03/bin:$PATH
/opt/eclipse32/eclipse

PATH=/usr/java/32/jre1.6.0_03/bin:$PATH should point to the bin directory of the previously installed.

The script also needed to be executable:

sudo chmod 755 eclipse.sh

and I also changed the ownership of all the files and directories to my username:

sudo chown -R username:group *

That was pretty much it – I could run Eclipse by opening a Terminal window and running

cd /opt/eclipse32
./eclipse.sh

which got a little tiresome after the first time, so I created a menu item (System -> Preferences -> Main Menu) which pointed to /opt/eclipse32/eclipse.sh, and even included the png Eclipse logo for the icon :)

Any plugins can be downloaded, and extracted into the relevant directories – or, installed by the Eclipse Update Manager.

I’ve recently written a post on “Eclipse PDT and MySQL – SQL Explorer Plugin“, for anyone who needs to set up MySQL connections in Eclipse.


Something not quite right? Inaccuracies or invalid code? Didn’t work for you? Don’t like me using Ss instead of Zs? Add a comment below! All comments are welcome. Except spam, because spam is a bit crap.


eBay Logo  

Lot 6 New HP G60 15.6 Laptop Notebook Win 7 HDMI Webcam


Lot 6 New HP G60 15.6 Laptop Notebook Win 7 HDMI Webcam


$3,149.95


Lenovo ThinkPad X201s 5397FFU 5397-FFU Notebook/Laptop


Lenovo ThinkPad X201s 5397FFU 5397-FFU Notebook/Laptop


$2,646.40


Lenovo ThinkPad X201s 5413FFU 5413-FFU Notebook/Laptop


Lenovo ThinkPad X201s 5413FFU 5413-FFU Notebook/Laptop


$2,636.88


New Lenovo ThinkPad W510 43192RU Laptop Notebook


New Lenovo ThinkPad W510 43192RU Laptop Notebook


$2,494.99


Lenovo ThinkPad X200s 7469-5GU 74695GU Notebook/Laptop


Lenovo ThinkPad X200s 7469-5GU 74695GU Notebook/Laptop


$2,385.48


No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

Tags: , , , , , , , ,

14 comments

» Comments RSS Feed
  1. I spent a day, looking for what was wrong… I think i saw today every possible error of Eclipse… But now, it works !

    Thanks a lot !

    Wodkaist – A French Developer

  2. Thank for show me the path… i really need to use symfoclipse and the way that you show makes it work.

  3. [...] copied the two directories to my Eclipse root installation directory (see my previous post “Eclipse PDT IDE for PHP MySQL 32 Bit install on 64 Bit Ubuntu“), which is [...]

  4. Just last week started on a brand new laptop with Ubuntu Gutsy. Got Eclipse 64bit working with Icedtea JDK. Up until now things have been ok – plugins can be installed, SVN fetched/updated/committed, etc. Will see how things go…

  5. many thanks for this info :)

  6. @ Jan: Sounds good – I’ll have to look into that. It was a while ago I tried to install the 64 bit version, so hopefully the latest release may have solved some of the issues I was having.

    @ Wodkaist, Madmax & m: I’m glad it helped :) and happy to know that it’s worked for others too! Good luck with your Eclipse development!

  7. [...] 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 [...]

  8. [...] for 64-bit Linux has various problems. You might want to run 32-bit Eclipse (another relevant blog post). When you use Linux distribution specific Eclipse install, all your [...]

  9. check this link
    http://wiki.eclipse.org/PDT/Installation#Install_a_JVM

  10. Hi,
    I have already installed MyEclipse for JAVA in my system. Now I need to configure this to use as PHP IDE.
    Can you help me out?

    Thanks in Advance
    Nehatha

  11. Hi Nethana,

    You can install PDT from the update site, and it will be installed alongside your Java environment – but it also needs a few dependencies satisfied. You can install it from the Update Manager within Eclipse, by going to the Help -> Software Updates -> Find and Install

    Add the following as Remote Sites:

    * 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/

    (you only need a couple of packages from GEF and EMF – WTP (Web Tools Platform) requires a package from GEF, and GEF from EMF… For more details, you can follow the “PDT and WTP” section of http://www.64bitjungle.com/tech/64-bit-eclipse-linux-installation-including-pdt-wtp-wst-atf-and-mysql-sql-explorer-plugin)

    I hope that helps – if you have any more questions, please ask :)

  12. [...] Aca el enlace al tutorial [...]

  13. Hi,

    Thanks so much, while trying to install pdt from normaly installed eclipse I’ve got a lot of errors. My OS is Debian 4.0 so from repos I can only get jre in v. 5 and PDT was terribly slow. Only way form me was to install version 6 from Sun page, but till I’ve found your article I’ve no idea to show pdt new path (not default) for jre.

    Thanks a lot!!

  14. what a thought, good point

Leave a comment