ubuntu java 出现
the program javac can be found in the following packages ubuntu
root@dkq:/a_dkq/tool/java/jdk1.8.0_102/bin# sudo update-alternatives --set "java" "/a_dkq/tool/java/jdk1.8.0_102/bin/java"
root@dkq:/a_dkq/tool/java/jdk1.8.0_102/bin# sudo update-alternatives --set "javac" "/a_dkq/tool/java/jdk1.8.0_102/bin/javac"root@dkq:/a_dkq/tool/java/jdk1.8.0_102/bin# sudo update-alternatives --set "javaws" "/a_dkq/tool/java/jdk1.8.0_102/bin/javaws"
java出现:Error occurred during initialization of VM java/lang/提示
2)出现该问题的原因是:
JAVA_HOME/lib中的tools.pack没有被解压成tools.jar,执行:
JAVA_HOME/jre/lib中的rt.pack没有被解压成rt.jar
(3) 解决的方法是:
进入到JAVA_HOME/lib中,将tools.pack解压成tools.jar,执行:
unpack200 tools.pack tools.jar
进入到JAVA_HOME/jre/lib中,将rt.pack解压成rt.jar:
unpack200 rt.pack rt.jar
(4)如果上述解决方法中出现unpack200 command not found之类的提示,
请检查java的环境变量配置是否正确