yum 查看java版本_在使用Java -version查看jdk版本信息报错处理

配置完环境变量后用java -version测试出现“bash: ./java:

/lib/ld-linux.so.2: bad ELF interpreter:

没有那个文件或目录”的问题“,于是到网上搜了下,用sudo yum install

glibc.i686命令安装好glibc之后问题可以解决。

解决好上面那个问题 继续使用Java -version

测试,结果出现“ java/lang/NoClassDefFoundError:

java/lang/Object”​

本着净重程序员老辈们的心,先不要骂娘,搜了一下,终于找到了解决办法:

You can either uninstall, then reinstall Java with an

installer and/or more privileges or try the

following:

Check in your JDK folder for *.pack files in jre/lib

and jre/lib/ext such as rt.pack (the default location is

c:\nameof_jdk_folder\jre\lib for Microsoft Windows and

/usr/java/lib for Unix/GNU Linux)

Those *.pack files need to be unpacked to .jar files

using this command:

For

Windows:

%JAVA_HOME%\bin\unpack200 -r -v -l "" rt.pack rt.jar

For *nix, a

similar command line will unpack the files:

cd

/usr/java/lib

/usr/bin/unpack200 rt.pack rt.jar

and repeat that step with all of the *.pack files and

relaunch your program.

看不懂没关系​,我来告诉你啊,上面那段话没什么意思,就是让你重装,或者获取更多权限。我觉得吧。。。。重装吧

心中一万只小小鸟飞过。。。​

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值