Reputation: 2956
I am new to Android Development.I installed Eclipse Kepler and then installed android SDK.
but on restarting eclipse i get the message that JRE installed is 1.6,newer version neeeded
.but when i tried to install the latest version through terminal it says newest version is already installed in the system.
what i am doing wrong?
thanks.
The error message window
And the following code when i tried to install the latest JRE 7.
winnou@winnoupc10 ~ $ sudo apt-get install openjdk-7-jre
[sudo] password for winnou:
Reading package lists... Done
Building dependency tree
Reading state information... Done
openjdk-7-jre is already the newest version.
openjdk-7-jre set to manually installed.
The following packages were automatically installed and are no longer required:
language-pack-zh-hans language-pack-kde-en language-pack-kde-zh-hans language-pack-kde-en-base kde-l10n-engb kde-l10n-zhcn
language-pack-zh-hans-base firefox-locale-zh-hans language-pack-kde-zh-hans-base
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 736 not upgraded.
Upvotes: 0
Views: 293
Reputation: 2956
Solved:
I was getting the error because there were 2 versions of JRE installed and the default was JRE 6.so i changed the default version to 7 and it solved the issue.
Type the following command in terminal and follow the instructions.
sudo update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java 1061 auto mode
1 /usr/bin/gij-4.6 1046 manual mode
2 /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java 1061 manual mode
3 /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java 1051 manual mode
Press enter to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java to provide /usr/bin/java (java) in manual mode.
Upvotes: 1