Java uninstalled but still cannot install java 6 macOS

  • First, try to download listed Java and if that didn't go straightway, use the following script to install it.

Here is a simpler way, an AppleScript that removes the installation limits from Java for macOS 2017-001.

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

The script asks you to select the dmg file, opens the file, unpacks JavaForOSX.pkg, modifies the Distribution file and saves a new pkg file on Desktop, Java.pkg, that can be installed on Catalina.


For those who prefer doing this directly in Terminal:

t=${TMPDIR:-/tmp}/java
hdiutil mount /path/to/javaforosx.dmg
pkgutil --expand /Volumes/Java\ for\ macOS\ 2017-001/JavaForOSX.pkg "$t"
hdiutil unmount /Volumes/Java\ for\ macOS\ 2017-001
sed -i '' 's/return false/return true/g' "$t"/Distribution
pkgutil --flatten "$t" ~/Desktop/Java.pkg
rm -rf "$t"
open ~/Desktop/Java.pkg

there is another possibility to make Scilab work on Catalina: install an OpenJDK such the ones available at https://adoptopenjdk.net/. These JDK will allow Scilab to start on Catalina out of the box, unlike JDK from Oracle which are not AppBundle and JNI aware.