問題
打開Arctime pro提示需要安裝Java 6,點(diǎn)擊“更多信息”進(jìn)入蘋果官網(wǎng)下載了一個(gè) JavaForOSX.dmg 的文件,安裝到后面卻提示存在更高版本的Java,嘗試用網(wǎng)上搜到的腳本未果,最終用如下步驟解決。
步驟
1.下載javaforosx.dmg
2.快捷鍵command+空格鍵,搜索腳本編輯器,即 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 ~/tnn"
do shell script "hdiutil unmount /Volumes/Java\\ for\\ macOS\\ 2017-001/"
do shell script "sed -i '' 's/return false/return true/g' ~/tnn/Distribution"
do shell script "pkgutil --flatten ~/tnn ~/Desktop/Java.pkg"
do shell script "rm -rf ~/tnn"
display dialog "Modified Java.pkg saved on desktop" buttons {"Ok"}
再執(zhí)行

執(zhí)行操作
3.在彈出的對(duì)話框中選擇 javaforosx.dmg
選擇javaforosx.dmg的文件所在地
4.文件安裝位置
/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
5.安裝完成后,成功打開了Arctime pro

成功打開Arctime pro