Skip to content

How to install eclipse SDK 3.6.2 (Helios) with Subclipse and the Marketplace Client

05/18/2011

eclipse

It seems there are many, many users who are having difficulties installing eclipse on Ubuntu/Kubuntu. The version of eclipse in the repositories is outdated (around version 3.2, iirc) and the unofficial ppa doesn’t work. I found a handful of guides that explained the general process for eclipse setup, but they didn’t specifically work for my system. So I mashed those guides together here and managed to get it working:

1. Install Sun Java JDK 6

To get the Sun Java SDK 6, pop open konsole and input the following:

$ sudo aptitude install sun-java6-bin sun-java6-jre sun-java6-jdk

Kubuntu has the Open JDK set as default. We have to change that:

$ sudo update-java-alternatives -s java-6-sun

Now we will edit the overall system preferences for JDK selection order (Note: you can use kate or nano or gedit or nedit or whatever text editor you like in place of vim):

$ sudo vim /etc/jvm

Ensure that /usr/lib/jvm/java-6-sun is at the top of the file. It should look something like this:

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

2. Download eclipse SDK 3.6.2 (Helios)

Go to www.eclipse.org/downloads and grab eclipse IDE for Java Developers (32-bit). I attempted to get this working with eclipse Classic, but had major problems installing plugins.

3. Optional step: Download the Marketplace Client

Go to http://www.eclipse.org/mpc/ and grab the latest version of the marketplace client. The one I used is compatible with both Helios SR1 & SR2:
http://www.eclipse.org/downloads/download.php?file=/mpc/releases/1.0.1/mpc-1.0.1.zip

4. Change to root user

$ sudo su

5. Extract Eclipse package

$ tar -xvzf eclipse-java-helios-SR2-linux-gtk.tar.gz -C /opt

If you downloaded the Marketplace Client in step 3:

$ unzip mpc-1.0.1.zip -d /opt/eclipse

6. Add read permissions to all files

$ chmod -R +r /opt/eclipse

7. Create eclipse executable on /usr/bin path

$ touch /usr/bin/eclipse
$ chmod 755 /usr/bin/eclipse

## Open eclipse file with your favourite editor ##
$ vim -w /usr/bin/eclipse

## Paste following content to file ##
#!/bin/sh
export ECLIPSE_HOME="/opt/eclipse"

$ECLIPSE_HOME/eclipse $*

8. Create desktop launcher

$ touch /usr/share/applications/eclipse.desktop

## Add following content to file and save ##
[Desktop Entry]
Encoding=UTF-8
Name=eclipse
Comment=Eclipse Helios SR2
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Application;Development;
StartupNotify=true

9. Start eclipse

Load from launcher or start from konsole with:

$ eclipse&

10. How to get Subclipse SVN working:

Well now we have eclipse up and running. You could try installing Subclipse from the Marketplace Client, but I installed it from the ‘Install New Software’ menu within eclipse. Go to Help -> Install New Software and click ‘add.’ Add the following information to the dialogue that appears:

name: Subclipse 1.6.x (Eclipse 3.2+)
url: http://subclipse.tigris.org/update_1.6.x

Now shut down eclipse for the time being.You’re going to need to install the SVN library for Java:

$ sudo  apt-get install libsvn-java

11. Make sure Eclipse runs with the right arguments.

Open the following file:

$ vim /opt/eclipse/eclipse.ini
eclipse comes with this file named eclipse.ini. This file is parsed for configuration information when the Eclipse launcher starts the JVM. Look in the ini file for a line that says “-vmargs”. Add a new line after this as follows:
-showsplash
org.eclipse.platform
-framework
plugins/org.eclipse.osgi_3.4.0.v20080605-1900.jar
-vmargs
-Djava.library.path=/usr/lib/jni
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m

You should be up and running now. Let me know if you have any issues in the comments and I’ll see if I can help.

Acknowledgements:

This post is basically a butchering of a post at if-not-true-then-false.com. Many thanks to JR for writing it. It was better installation support than I could find anywhere else.

if-not-true-then-false.com/2010/linux-install-eclipse-on-fedora-centos-red-hat-rhel/

cyberciti.biz/faq/howto-ubuntu-linux-install-configure-jdk-jre/

subclipse.tigris.org/wiki/JavaHL

Advertisements
One Comment leave one →
  1. Dam permalink
    02/08/2012 04:04

    Thank you!
    Sun Java SDK 6 is not in the repository any longer, but the remaing part of the guide save me a lot of time!

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

%d bloggers like this: