高版本的mac 安装 java6

高版本的mac 安装 java6.txt

引用文件:https://forums.macrumors.com/threads/java-6-runtime-legacy-version-for-macos-catalina.2195954/

一、注意:
1.java官网是下载不到javaforosx.dmg,这个是apple官网提供的兼容配套java程序
2.高版本的mac无法直接安装javaforosx.dmg,会提示当前系统已经有更高的版本。

二、执行步骤

1.下载javaforosx.dmg

2.在 Apple Script执行如下程序

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"}
macjava.png

3.在弹出的对话框中选择 javaforosx.dmg
按照输入框执行程序

4.文件安装位置
/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

你可能感兴趣的:(高版本的mac 安装 java6)