HowTo: Eclipse 3.2 + PHPEclipse + Subclipse in Ubuntu Feisty Fawn

This HowTo are for those who would like to participate in the upcoming PHPUGPH PMS Project. It’s just a HowTO to help anyone who would want to try Eclipse with PHPEclipse and Subclipse.

Install Eclipse

1. Open your terminal.

sudo apt-get install eclipse

2. Install Sun JRE:

sudo aptitude install sun-java6-jre sun-java6-plugin sun-java6-bin sun-java6-fonts

3. Make Sun’s JVM default:

sudo update-alternatives --config java

4. Choose the line that says.

/usr/lib/jvm/java-6-sun/jre/bin/java

5. Edit the JVM Configuration file:

gksudo gedit /etc/jvm

# This file defines the default system JVM search order. Each
# JVM should list their JAVA_HOME compatible directory in this file.
# The default system JVM is the first one available from top to
# bottom.

/usr/lib/jvm/java-6-sun
/usr/lib/jvm/java-gcj
/usr/lib/jvm/ia32-java-1.5.0-sun
/usr/lib/jvm/java-1.5.0-sun
/usr

6. Next, we need to tell Eclipse to use this JVM as well. This can be done on systemlevel or userlevel.

gksudo gedit /etc/eclipse/java_home

# This file determines the search order the Eclipse Platform uses to find a
# compatible JAVA_HOME. This setting may be overridden on a per-user basis by
# altering the JAVA_HOME setting in ~/.eclipse/eclipserc.

/usr/lib/jvm/java-6-sun
/usr/lib/jvm/java-gcj
/usr/lib/kaffe/pthreads
/usr/lib/jvm/java-1.5.0-sun
/usr/lib/j2se/1.5
/usr/lib/j2se/1.4
/usr/lib/j2sdk1.5-ibm
/usr/lib/j2sdk1.4-ibm
/usr/lib/j2sdk1.5-sun
/usr/lib/j2sdk1.4-sun

7. User:

gedit ~/.eclipse/eclipserc

JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun/

Install PHPEclipse

An automated installation of PHPEclipse is available via the Eclipse Update Manager.

1. Click on Help->Software Updates->Find/Install from file menu in Eclipse.
2. Select the radio button labeled, “search for new features to install”.
3. Click on the “New Remote Site” button.
4. Enter the name PHPEclipse, and the URL: http://phpeclipse.sourceforge.net/update/releases

Name: PHPEclipse
URL: http://phpeclipse.sourceforge.net/update/releases

5. Click on “Finish”.
6. A list of features will be presented, open the list and check the one labeled “phpeclipse”.
7. Click on “Next”
8. Follow the onscreen instructions to finish the automatic install.

Install Subclipse in Eclipse 3.x

1. Begin the installation from the Eclipse Help menu item.
2. This screenshot show the screen as it initially comes up. In this case you will need to change the radio button to indicate that this is a new install.
3. This screen will vary depending on the features you have installed already. You want to click on the New Remote Site button. If you are behind a proxy and the Eclipse install mechanism does not work, then you can download a zipped version of the update site and then click the New Local Site button instead.
4. This screen is showing the New Remote Site dialog, filled in with the correct information to install Subclipse

Name: Subclipse 1.2.x (Eclipse 3.2+)
URL: http://subclipse.tigris.org/update_1.2.x

5. When you first come back to this screen, the site you added will NOT be selected. Be sure to select it before clicking Next.

NOTE:
If you are unable to proceed in the installation during the checking of site try to uncheck all Mylar option.

6. This next screen shows all of the features that are available to install.
7. Click the button to accept the license agreement.
8. Confirm the install location
9. There is an Eclipse preference to turn off this next dialog. I have never seen a signed feature. Not even Eclipse.org nor IBM sign their features.
10. A dialog box of the in-process installation.
11. Eclipse needs to be restarted after installing Subclipse.
12. Finally, after restarting Eclipse, the first thing you will typically want to do is open the Subclipse Repository perspective where you can define your repositories. Be sure to also check the online help as well as the Subclipse preferences located under Team -> SVN.

Eclipse Mylyn formerly known as Mylar is a task-focused UI that reduces information overload and makes multi-tasking easy. It does this by making tasks a first class part of Eclipse, and integrating rich and offline editing for repositories such as Bugzilla, Trac, and JIRA. Once your tasks are integrated, Mylyn monitors your work activity to identify information relevant to the task-at-hand, and uses this task context to focus the Eclipse UI on the interesting information, hide the uninteresting, and automatically find what’s related. This puts the information you need to get work done at your fingertips and improves productivity by reducing searching, scrolling, and navigation. By making task context explicit Mylyn also facilitates multitasking, planning, reusing past efforts, and sharing expertise.


Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically each day to your feed reader.

Trackbacks & Pingbacks

No trackbacks/pingbacks yet.

Comments

To mention one of possible problems when eclipse doesn’t find JVM in eclipse start script:
/usr/bin/eclipse
..
JAVACMD=”/usr/lib/j2re1.5-sun/bin/java”
in my case i changed it to:
JAVACMD=”/usr/lib/jvm/ia32-java-6-sun-1.6.0.07/jre/bin/java”
or use jvm that is installed in system.

Hi there,

Thanks for the post. I would like to suggest to clarify certain things. For example selecting the correct JVM. My selection for example showed:

# sudo update-alternatives –config java

There are 2 alternatives which provide `java’.

Selection Alternative
———————————————–
1 /usr/bin/gij-4.2
*+ 2 /usr/lib/jvm/java-gcj/jre/bin/java

of which I selected the line containing the text ‘jre’ in the path name.

Also, the automatic installation of PHP Eclipse worked only once I changed the URL to a path which contained a file named ’site.xml’. For my installation this meant that the following URL needed to be entered:

http://phpeclipse.sourceforge.net/update/stable/1.2.x/

However, it seems to me that this URL may change frequently and hence, future attempts to install PHPEclipse should take this fact into account.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

(required)

(required)