无法在树莓派中更新jdk1.7.0_45 [英] fail to update jdk1.7.0_45 in raspberry pi

查看:153
本文介绍了无法在树莓派中更新jdk1.7.0_45的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Window笔记本电脑和覆盆子pi开发TV Scoreboard应用程序. 我正在用腻子进行套接字连接.

I'm developing the TV Scoreboard app with the use of window laptop and raspberry pi. I'm using the putty to have socket connection.

在请求声明X11服务器变量之前,所以我已经将Xming服务器安装在窗口笔记本电脑中并固定为localhost:0.0.0.0

Before that it request to state the X11 server variable, so I have installed the Xming server in my window laptop and fixed to localhost:0.0.0.0

但是JFLauncher会继续弹出消息以安装最新的Java Runtime. 所以我认为最新的和合适的应该是jre 1.7.0_45.

But JFLauncher keep pop up the message to install the newest Java Runtime. So I think the latest and suitable one should be jre 1.7.0_45.

我已经下载了e jre-7u45-fcs-b15-linux-arm-vfp-hflt-client_headless-26_sep_2013

 mkdir java
    cd java
    tar zxvf *.gz

解压缩后,我删除了rar文件.

after unpack, I remove the rar file.

./bin/java -version

它显示最新版本,但如果我只是

it show the latest version but if I just

java -version

它显示了旧版本的详细信息.

it show the old version detail.

我应该怎么做才能将其更新为最新版本? 我的步骤有任何错误吗?

what should I do to update it to the latest version? Any mistake for my steps?

推荐答案

但是如果我只是java -version,它将显示旧版本的详细信息.

but if i just java -version it show the old version detail.

从命令行运行此命令时,shell将评估PATH环境变量,以确定如何消除命令的歧义.如果不确保新的Java二进制位置在您的PATH中,并且优先级高于旧的Java二进制位置,则外壳将无法执行新的Java.

When you run this command from your command line, the PATH environment variable is what the shell will evaluate to determine how to disambiguate your command. If you don't ensure that the new java binary location is in your PATH, and has a higher precedence than the old one, then the shell has no way of knowing to execute your new java.

请尝试以下操作:

$which java //tells you which java command the shell will execute
$echo $PATH //shows you what directories are in your path
$export PATH=/my/new/java/bin/directory:$PATH //set your new java into the PATH env
$java -version

有关设置PATH的信息,请参见教程.

See this tutorial on setting PATH.

这篇关于无法在树莓派中更新jdk1.7.0_45的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆