Few days ago I wanted to install latest version of Netbeans (version 7.4) on my Ubuntu 12.04 machine. One prerequisite of new Netbeans version is Java Oracle 1.7 and by default Ubuntu is shipped with Open JDK 1.6, therefore, I had to no way except installing Oracle Java 7 on my Ubuntu. For installing Java Oracle, I followed Webupd8.org website guideline which is accessible at this link.
After installing new Java version I could install latest version of Netbeans and everything was working fine and good until I tried to open Eclipse which I have faced with the following error as you can see in the below picture.
With the little searching I did realize that the version of Eclipse (INDIGO 3.7.2) that is available in Ubuntu repository does not support new version of Java and there are only two possible ways are available.
First way, installing newer version of Eclipse manually which I found a little bit tedious and tricky and second way, switch the version of Java to Open JDK when I want to use Eclipse.
Therefore, I found the second way is much suitable and easier for me and I choose that one. Since two versions of Java (Open JDK and Oracle Java) are available on the machine, it is possible to select which version of Java to be used with the following command,
$ sudo update-alternatives --config java
After running the above command, console shows the list of the available Java that installed on the system and asks to select one version and in this case Open JDK should be selected.
For more information please refer to following links,
Original link of the solution (Stack Overflow.com)
Upgrading Eclipse to Juno 4.2 manually.
send your idea and information to firstname.lastname@example.org