Install PDT 2.0.1 and Eclipse 3.4.1 in ubuntu 9.04
Posted on | May 24, 2009 | Views (1,226)
What is PDT?
The PDT is working towards providing a fully functional PHP Integrated Development Environment framework for the Eclipse platform. This project will encompass all development components necessary to develop PHP-based Web Applications and will facilitate extensibility. It will leverage the existing Eclipse WTP Project in providing developers with PHP capabilities. The main components in this project are: Editor (syntax highlighting, code assist and code folding), Inspection (file / project outline and PHP explorer view) and Debug (PHP script and web page methods).
Step 1 Install JDK
At the moment of writing, Ubuntu repositories contain Eclipse 3.2.2 while latest release is version 3.4.1. If one wants to stay current with Eclipse version, it has to be installed manually.
When installing from distributable archives, Eclipse has only dependency – Java JDK. In this example I will use Sun JDK. To verify which Java has been installed, type in terminal:
java -version
To install it Sun’s JDK ver 6, issue the following command:
apt-get install sun-java6-jdk
Step 2 Install PDT Eclipse all-in-one
In this example, we’ll install All-In-One Linux x86/GTK 2. The package can be downloaded here.
When download finishes, we’ll uncompress the archive. Here I suppose that archive is saved in user’s home directory.
cd
tar -zxvf pdt-all-in-one-linux-gtk-2.0.1.tar.gz
This will create directory /home/[USER_NAME]/eclipse
Now you can start eclipse by type the following command in a terminal
~/eclipse/.eclipse
This way is not very efficient, in the next step I will show you how to creat a excutable and a menu item.
Creat Eclipse executable and menu item
Move the eclipse directory to /opt and rename it on adding the current version.
sudo mv ~/eclipse /opt/eclipse-3.4.1
Then create an eclipse executable in your path
sudo gedit /usr/local/bin/eclipse
with this content
#!/bin/bash
export JAVA_HOME=”/usr/lib/jvm/java-6-sun”
export ECLIPSE_HOME=”/opt/eclipse-3.4.1″$ECLIPSE_HOME/eclipse
To make it executable, use this command
sudo chmod 755 /usr/local/bin/eclipse
Then create a gnome menu item
sudo gedit /usr/share/applications/eclipse.desktop
With this contents
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=eclipse
Icon=eclipse
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true
After executing this command, you can run from the menu item
applications/programming/eclipse
Conclusion
Voila, it’s PDT, To install the newer version, it will be the same method.
Comments
4 Responses to “Install PDT 2.0.1 and Eclipse 3.4.1 in ubuntu 9.04”
Leave a Reply
Hi everyone, I'm Hui, a student originally from China, now studying at TELECOM SudParis in France. Hui-Wang.info is being used as a place to record my various adventures with technology.
May 28th, 2009 @ 10:03 AM
Works for me. .log file in workspace contains some errors but looks like it does not make any problems. Thanks
[Reply]
May 28th, 2009 @ 9:26 PM
Could you tell me where the .log file is. In my workspace, there is only a .metadata file
[Reply]
June 18th, 2009 @ 6:52 AM
Hi,
I used this tutorial to help me to set up PDT. Well written. Thanks.
By the way, you blog design looks very elegant.
[Reply]
Hui Reply:
June 21st, 2009 at 12:08 AM
thanks, i am glad that you like both the post and the blog.
[Reply]