mac os 10.15安装jdk 1.6

1、如果出现报错 已经安装了最高版本

下载请看:https://www.jianshu.com/p/3b580c405c7c
请看下面方法处理错误

1、在mac的访达中 找到 “脚本编辑器”
输入如下(原文:https://forums.macrumors.com/threads/java-6-runtime-legacy-version-for-macos-catalina.2195954/)


set theDMG to choose file with prompt "Please select javaforosx.dmg:" of type {"dmg"}
do shell script "hdiutil mount " & quoted form of POSIX path of theDMG
do shell script "pkgutil --expand /Volumes/Java\\ for\\ macOS\\ 2017-001/JavaForOSX.pkg ~/tmp"
do shell script "hdiutil unmount /Volumes/Java\\ for\\ macOS\\ 2017-001/"
do shell script "sed -i ‘‘ ‘s/return false/return true/g‘ ~/tmp/Distribution"
do shell script "pkgutil --flatten ~/tmp ~/Desktop/Java.pkg"
do shell script "rm -rf ~/tmp"
display dialog "Modified Java.pkg saved on desktop" buttons {"Ok"}

2、运行脚本,然后选择刚才下载的JavaForOSX.dmg,然后成功以后 会在桌面有一个java.dmg 运行就ok了

mac os 10.15安装jdk 1.6

上一篇:mac 使用的软件


下一篇:Linux、Ubuntu、CentOS安装和配置zsh