如何在 Mac OS X 10.10 上安装 Java?
java1.6版安装
http://support.apple.com/kb/DL1572
因为并非所有用户都用得着 Java ,所以在默认状态下 OS X 不预装 Java , 如果你需要的话可以手动安装.
到苹果官网下载 http://support.apple.com/kb/DL1572
http://support.apple.com/downloads/DL1572/en_US/JavaForOSX2014-001.dmg
安装后在终端输入
java -version
如果显示版本就说明安装好了.
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)
如果显示如下, 就说明没安装对,需要重新来过.
No Java runtime present, requesting install.
java1.8安装同上去oracle网站下载
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
安装java1.8之后如何降级为1.6
在安装了java8和java6之后,停用java8使用java6
打开终端.
创建备份目录
sudo mkdir -p /Library/Internet Plug-Ins/disabled
备份插件
sudo mv /Library/Internet Plug-Ins/JavaAppletPlugin.plugin /Library/Internet Plug-Ins/disabled
恢复java6 applet plug-in
sudo ln -sf /System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPlugin2_NPAPI.plugin /Library/Internet Plug-Ins/JavaAppletPlugin.plugin
恢复 Java SE 6 Web Start:
sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws
恢复java8环境
禁用 Java SE 6 Web Start opening:
sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javaws /usr/bin/javaws
要想恢复 Java 8 applet plug-in 只能通过重新安装最新的java8
我想知道,我安装了java8 但是在终端输入version还是1.6 这怎么办