我是Android Development的新手。我安装了Eclipse Kepler,然后安装了android SDK。
但是在重新启动eclipse时,我收到JRE installed is 1.6,newer version neeeded
的消息。但是当我尝试通过终端安装最新版本时,它说系统中已经安装了最新版本。
我做错了什么?
感谢。
错误消息窗口
当我尝试安装最新的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.
答案 0 :(得分:1)
<强>解决:强>
我收到了错误,因为安装了2个版本的JRE,默认版本是JRE 6.所以我将默认版本更改为7并解决了问题。
在终端中键入以下命令,然后按照说明进行操作。
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.