正确安装jdk后,eclipse找不到jdk路径

建立eclipse快捷方式以后,从快捷方式启动,出现找不到jvm的情况,是因为eclipse默认从系统原来的jdk去找jvm。执行一下操作即可。

sudo update-alternatives --install /usr/bin/java java /usr/local/java/1.7/jdk1.7.0_21/bin/java 300

sudo update-alternatives --install /usr/bin/javac javac /usr/local/java/1.7/jdk1.7.0_21/bin/javac 300

sudo update-alternatives --install /usr/bin/jar jar /usr/local/java/1.7/jdk1.7.0_21/bin/jar 300

sudo update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/java-7-sun/bin/javah 300

sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/java-7-sun/bin/javap 300

没有更多推荐了,返回首页