配置完环境变量后用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.
看不懂没关系,我来告诉你啊,上面那段话没什么意思,就是让你重装,或者获取更多权限。我觉得吧。。。。重装吧
心中一万只小小鸟飞过。。。