高版本的mac 安裝 java6.txt
引用文件:https://forums.macrumors.com/threads/java-6-runtime-legacy-version-for-macos-catalina.2195954/
一世落、注意:
1.java官網(wǎng)是下載不到javaforosx.dmg掘而,這個是apple官網(wǎng)提供的兼容配套java程序
2.高版本的mac無法直接安裝javaforosx.dmg套腹,會提示當前系統(tǒng)已經(jīng)有更高的版本。
二敛瓷、執(zhí)行步驟
1.下載javaforosx.dmg
2.在 Apple Script執(zhí)行如下程序
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
按照輸入框執(zhí)行程序
4.文件安裝位置
/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home