• Did you order new AirTags? We've opened a dedicated AirTags forum.

bogdanw

macrumors 65816
Mar 10, 2009
1,062
552
I think I have found the problem I cannot find javaforosx.dmg I can only find javaforosx.pkg
Not sure where the .dmg file will be???
If you downloaded the javaforosx.dmg from https://support.apple.com/kb/dl1572 and Safari automaticaly open it, just run the commands in Terminal.

when I try to open files from within the application now, it tells me all my folders are empty. Any idea why that would be?
You probably have to give the application permission to access the folders. Open System Preferences - Security & Privacy - Privacy - Full Disk Access and add your app.
 
Comment

Forsooth

macrumors newbie
Oct 12, 2019
2
0
If you downloaded the javaforosx.dmg from https://support.apple.com/kb/dl1572 and Safari automaticaly open it, just run the commands in Terminal.


You probably have to give the application permission to access the folders. Open System Preferences - Security & Privacy - Privacy - Full Disk Access and add your app.

Unfortunately this didn't work. It can see users->myuser->desktop-> and then theres no choice to select anything from my desktop. It just shows a blank screen as if there were nothing on my desktop.
 
Comment

carinco

macrumors newbie
Oct 11, 2019
7
0
Spain
I did download the javaforosx.dmg from the link you provided. It did not open automatically. when I clicked on the desktop icon a window opened with JavaFoOSX.pkg. When I double click on this icon the setup window opens and when I reach the Select a Destination section a message says: Java for macOS 2017-001 can't be instilled on this disc. A newer version of this package is already installed. Not sure where I can uninstall the newer version of even if this is advisable. So I am still stuck.
 
Comment

bogdanw

macrumors 65816
Mar 10, 2009
1,062
552
It did not open automatically. when I clicked on the desktop icon
It did opened automatically, that icon on your desktop is the opened dmg. :)
If you still see it, just run the commands in Terminal.
If not, use the AppleScript mentioned above and select javaforosx.dmg from your Downloads folder.
 
Comment

carinco

macrumors newbie
Oct 11, 2019
7
0
Spain
OK. I am learning, slowly. Thanks for your patience.

I ran the commands through terminal as instructed. No joy. I then tried using AppleScript mentioned above, also with no luck.

Going for a lie down now.
 
Comment

bogdanw

macrumors 65816
Mar 10, 2009
1,062
552
OK. I am learning, slowly. Thanks for your patience.
That's all right, we all learn something every day. May I ask for what do you need this version of Java, what application are you trying to run?

I ran the script recommended by bogdanw, and got this error:
error "User canceled." number -128
What does this mean?
It means you canceled the script before it was over. Try from Terminal as described here https://forums.macrumors.com/thread...sion-for-macos-catalina.2195954/post-27865244
 
Comment

Swampertech

macrumors newbie
Oct 13, 2019
6
0
Alabama
Open javaforosx.dmg, open the Terminal and run the following commands one by one:
Code:
pkgutil --expand /Volumes/Java\ for\ macOS\ 2017-001/JavaForOSX.pkg ~/tmp

sed -i '' 's/return false/return true/g' ~/tmp/Distribution

pkgutil --flatten ~/tmp ~/Desktop/Java.pkg
bogdanw, I'm not very software savvy, so how do I run those lines one by one?
 
Comment

carinco

macrumors newbie
Oct 11, 2019
7
0
Spain
I am trying to run a programme called WeatherLink 6.0.3C, it transfers weather details from a console on my desk to the computer. I have contacted Davis (the people whose weather machine it is) and they have provided an updated programme but it needs Java 6SE to run it. If I do not get any success on here I will have to go back to them and see what they say.
 
Comment

bogdanw

macrumors 65816
Mar 10, 2009
1,062
552
bogdanw, I'm not very software savvy, so how do I run those lines one by one?

If I do not get any success on here I will have to go back to them and see what they say.

I hope this will help, here is a video of how the script is supposed to work
Code:
https://imgur.com/a/t1p3XNP

Edit: A small change made to the script should keep the Script Editor in front of Finder

Code:
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 & " -noverify -nobrowse"
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"}
 
Last edited:
  • Like
Reactions: mikzn
Comment

Swampertech

macrumors newbie
Oct 13, 2019
6
0
Alabama
Sorry bogdanw, it must be pilot error here. I got the Java.pkg installed, ran the install and it seems to have been successfully installed. When I go to my app (new downloaded version), I still get this:
1571084693239.png



If I try and open a file in DIYLC, it gives me the same message. Any thoughts?
 
Comment

bogdanw

macrumors 65816
Mar 10, 2009
1,062
552
If I try and open a file in DIYLC, it gives me the same message. Any thoughts?
Assuming you have the app in /Applications, open Terminal, copy-paste
Code:
sudo xattr -rd com.apple.quarantine /Applications/DIYLC.app
and press Return/Enter. You will be asked for your password and Gatekeeper will let you open the app.
 
Comment

Swampertech

macrumors newbie
Oct 13, 2019
6
0
Alabama
bogdanw, I finally got the app to open (new version), but now my files don't open. I need to look in the DIYLC log files. Thanks for getting me this far with the app.
 
Comment

Swampertech

macrumors newbie
Oct 13, 2019
6
0
Alabama
Give the app Full Disk Access
View attachment 869638
bogdanw, you ARE the man! Thank you for not only fixing the Catalina Java problems with your script suggestions, but helping me to get the updated DIYLC app working properly to access all of my old files. This old hardware guy owes you a debt of gratitude. I'll contact bancika (DIYLC developer) to let him know you have a fix. Again, thanks my friend!
 
Comment

carinco

macrumors newbie
Oct 11, 2019
7
0
Spain
I ran the script as advised above but I get the following result:

error "Error encountered while creating /Users/colincarr/tmp. Error 17: File exists" number 1
 
Comment

bogdanw

macrumors 65816
Mar 10, 2009
1,062
552
I ran the script as advised above but I get the following result:
error "Error encountered while creating /Users/colincarr/tmp. Error 17: File exists" number 1
It was probably created on a previous unsuccessful attempt, rename or delete the /Users/colincarr/tmp folder.
 
  • Like
Reactions: ibt
Comment

nocsar

macrumors newbie
Oct 27, 2019
1
0
Open javaforosx.dmg, open the Terminal and run the following commands one by one:
Code:
pkgutil --expand /Volumes/Java\ for\ macOS\ 2017-001/JavaForOSX.pkg ~/tmp

sed -i '' 's/return false/return true/g' ~/tmp/Distribution

pkgutil --flatten ~/tmp ~/Desktop/Java.pkg
You're the real master... thanks so much
Greetings from Mexico
 
Comment

hcornel

macrumors newbie
Oct 31, 2019
1
0
Many thanks to the users who sent in their questions. Reading through the whole thread was super helpful.

Most of all: Brilliant, bogdanw. Thank you!!!
 
Comment

ancomi

macrumors newbie
Nov 7, 2019
1
0
Thank you very much. Your script worked and now I succeeded to install Java.:):):):)
 
Comment

Jinhao Chi

macrumors newbie
Nov 10, 2019
1
0
Here is a simpler way, an AppleScript that removes the installation limits from Java for macOS 2017-001.
Code:
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.
Worked for me as well! Thank you so much!
 
Comment
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.