The Mac has a clean uninstall jdk, jdk but it prompts to install the new update has been installed

Problem Description:

Two days before the Mac system upgrade catalina, the results of previously installed jdk1.6 actually did, so in Apple's official website to download jdk1.6 intend to re-install, the result is always prompt: "Java for macOS 2017-001" can not be installed on this disk . A later version of this package has been installed, the phenomenon shown: ,

But I am convinced that the system has been completely not the jdk.

 

 

Solving steps:

1. First, find the "Script Editor" application icon as shown on the Mac:

2. Copy the following code to the "Script Editor" application ( note wrap, wrap and if I posted is not as likely to be failed ):

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"}

3. Click the "Script Editor" upper left corner of the triangle, as shown:

4. Under normal circumstances after executing the third step will generate a window, choose your download jdk in the window, and then generates a new installation package in the desktop system, install the new installation package again.

 

Source: https://forums.macrumors.com/threads/java-6-runtime-legacy-version-for-macos-catalina.2195954/

Published 87 original articles · won praise 22 · views 190 000 +

Guess you like

Origin blog.csdn.net/gaofenglxx/article/details/102565883
Recommended