[Eclipse][Oracle JDK] Eclipse Indigo crashes at startup in Ubuntu 12.04

Problem :

Eclipse crashes at startup in Ubuntu 12.04 displaying an error dialog with the message “An error has occurred. See the log file /home/user/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/[a_long_number].log.” The log file is attached to the report.

Solution :

Eclipse Indigo is not compatible with Oracle’s JDK, in my case, it is JDK 1.6.0_45.

But it works with Open jdk, so idea is to change Oracle JDK to Open JDK in ubuntu 12.04

I supposed that you have already a Open JDK in your system. If not you could find it in the internet.

1. What your have to do first is modify your /etc/profile :

Add or Modify like this :

JAVA_HOME=/usr/local/java/your_open_jdk_folder
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH

Don’t forget to relancer the profile file with command . /etc/profile

2. And then notify the system Java is available :

sudo update-alternatives --install "/usr/bin/java" "java" 
"/your_open_java_folder/bin/java" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws"
"/your_open_java_folder/bin/javaws" 1

3. And set java runtime environment :

sudo update-alternatives --set java /your_open_java_folder/bin/java
sudo update-alternatives --set javaws /your_open_java_folder/bin/javaws
Advertisements

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