You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Problem with IOS Catalina installing Java OS X 2017-001

Hello,

I'm trying to install "Java for macOS 2017-001 installs the legacy Java SE 6 runtime" because an App that i use request me to install this version of java.. on my Mac I have IOS Catalina.


The problem is that during the installation session, the system says me that I can't install Java SE 6 because is already installed an updater versione of Java.


How can I solve the problem ?

thanks so much !!


MacBook Air 13″, macOS 10.15

Posted on Sep 27, 2020 4:14 AM

Reply
Question marked as Top-ranking reply

Posted on Sep 28, 2020 2:46 AM

You can solve this problem using Apple script, create a new script with the follow code, then apply it to "JavaForOSX.dmg", and then you can install it whitout problem.


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



here you can find a video: https://youtu.be/F9McJQwYRpQ

3 replies
Question marked as Top-ranking reply

Sep 28, 2020 2:46 AM in response to iSimo46

You can solve this problem using Apple script, create a new script with the follow code, then apply it to "JavaForOSX.dmg", and then you can install it whitout problem.


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



here you can find a video: https://youtu.be/F9McJQwYRpQ

Problem with IOS Catalina installing Java OS X 2017-001

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.