Tag Archives: eclipse

Eclipse 3.5 Galileo on Ubuntu 9.04 Jaunty Jackalope

By default Eclipse 3.2 which is packaged with Ubuntu 9.04 and can be installed using the Synaptic Package Manager runs with the GNU Compiler for Java, GCJ JVM and not the JVM provided by SUN. Additionally, Eclipse for Ubuntu is missing jUnit 4 due to legal restrictions on its use of Java 5, and it is disabled, causing import problems that prevents updating software or installing new features.

1. change java sdk
To check which java sdk is available:
sudo update-java-alternatives -l
Set the java-6-sun as the default java sdk:
sudo update-java-alternatives -s java-6-sun

2. download the x86 32bits version for linux of Eclipse Galileo, extract the archive and copy it to /usr/local/bin/eclipse-3.5
http://www.eclipse.org/downloads/

3. set JAVA_HOME in .bashrc

#configuration for java
JAVA_HOME="/usr/lib/jvm/java-1.6.0-sun"
export JAVA_HOME
PATH=.:$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export PATH

4. create a startup script, copy it to /usr/bin and make sure the username:group permission are 755 for the correct user

#!/bin/bash
PATH=/usr/lib/jvm/java-6-sun-1.6.0.13/bin:$PATH
/usr/local/bin/eclipse-3.5/eclipse

5. add the /usr/bin/eclipse script to the desktop menu via the >System>Preferences>Main Menu option which will create a desktop configuration file ~/.local/share/applications/alacarte-made.desktop

#!/usr/bin/env xdg-open
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=/usr/local/bin/eclipse-3.5/icon.xpm
Exec=/usr/bin/eclipse
Name[en_US]=Eclipse Galileo 3.5
Name=Eclipse Galileo 3.5
Icon=gnome-panel-launcher

or create a desktop configuration file /usr/share/applications/eclipse.desktop

[Desktop Entry]
Type=Application
Name=Eclipse 3.5 Galileo
Icon=/usr/local/bin/eclipse-3.5/eclipse.xpm
Exec=/usr/bin/eclipse
Categories=Application

Alacarte is a menu editor for GNOME desktop, it implements the XDG menu specification.