[英]getting old JRE version error in eclipse even when the new version is already installed
I am new to Android Development.I installed Eclipse Kepler and then installed android SDK. 我是Android开发的新手,先安装了Eclipse Kepler,然后安装了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. 但是在重新启动eclipse时,我得到的消息是JRE installed is 1.6,newer version neeeded
当我尝试通过终端安装最新版本时,它说系统中已经安装了最新版本。
what i am doing wrong? 我做错了什么?
thanks. 谢谢。
The error message window 错误消息窗口
And the following code when i tried to install the latest JRE 7. 以及以下代码,当我尝试安装最新的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.
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. 我收到错误消息是因为安装了2个版本的JRE,默认版本是JRE6。所以我将默认版本更改为7,从而解决了该问题。
Type the following command in terminal and follow the instructions. 在终端中键入以下命令,然后按照说明进行操作。
sudo update-alternatives --config java 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.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.