Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bogdanw

macrumors 603
Mar 10, 2009
6,115
3,021
which macOS version are you running on? You didn't even have to modify your java 6?
After installing Java, on Catalina 10.15.3
java.jpg
 
  • Like
Reactions: maccaskaty

bogdanw

macrumors 603
Mar 10, 2009
6,115
3,021
well... not sure why is it not working for me? What could be the reason? any last resort which I can try?
Temporary disable Gatekeeper: open the Terminal app (Applications/Utilities/Terminal.app) and run
Code:
sudo spctl --master-disable
Try to open the app.
Gatekeeper can be re-enabled with
Code:
sudo spctl --master-enable
 

maccaskaty

macrumors newbie
Apr 7, 2020
9
0
Temporary disable Gatekeeper: open the Terminal app (Applications/Utilities/Terminal.app) and run
Code:
sudo spctl --master-disable
Try to open the app.
Gatekeeper can be re-enabled with
Code:
sudo spctl --master-enable
no luck in getting it to run!!! I guess I might have to get windows or look for someone to physically help me solve this problem!!! appreciate your help!
 

katlemons

macrumors newbie
Apr 10, 2020
2
1
Download Java for OS X 2017-001 https://support.apple.com/kb/dl1572
Open AppleScript (/Applications/Utilities/Script Editor.app) and copy-paste the code
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"}
Run the script (⌘+R), select the javaforosx.dmg, wait for the script to finish and install the Java.pkg saved on your desktop.


This seemed to work perfectly, ran the script, Opened the Java.pkg file that was created to my desktop and was able to install Java. At least, it SAID the installation was successful. BUT I don't see Java in my system preferences and when I try to open a my Jar file I get the message
The Java JAR file “smart_launcher.jar” could not be launched.
Check the Console for possible error messages.

BUT, I can't find the Java Console to check for error messages since Java is not showing under system preferences. Anybody have any ideas?
 
  • Like
Reactions: maccaskaty

albero1

macrumors newbie
Sep 28, 2020
1
0
Hi there, I know this thread is quite old now, but I need your help!

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

I've done this and work perfectly, but then I needed to switch to Java 8 so I deleted the java6 pkg from JavaVirtualMachines.

The problem is now I need back Java6 and the same instructions won't work. The script gives me the following error:

"Error encountered while creating /Users/Alba/tmp. Error 17: File exists"

What can I do?
 

cdiaz

macrumors newbie
Nov 24, 2020
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.
Hello, I am trying to install the Legacy Java SE 6 on a macOS Catalina. I followed the instructions here, but it gives me the following error: error "Error encountered while creating /Users/cdiaz/tmp. Error 17: File exists" number 1.
Ok, a bit more detail of what I am doing:
I downloaded the Java version from here https://support.apple.com/kb/dl1572?locale=en_US, and I leave it in the downloads folder.
I run the script and when it prompts me for the file, I select the one in the downloads folder, then it gives me the error but the installer opens. I run the installer and find the same problems with the disks not being usable due to the other have version on them.
Any help would be greatly appreciated. Thanks!
 

leon-geyer

macrumors newbie
Oct 19, 2010
13
0
Hi there, I know this thread is quite old now, but I need your help!



I've done this and work perfectly, but then I needed to switch to Java 8 so I deleted the java6 pkg from JavaVirtualMachines.

The problem is now I need back Java6 and the same instructions won't work. The script gives me the following error:

"Error encountered while creating /Users/Alba/tmp. Error 17: File exists"

What can I do?
Hi albero1, that problem is quite easy to solve. I run into the same: another program had already created an temp-folder in my user folder. Simply go to your user (/Users/Alba in your case) and move the existing "temp" folder shortly to desktop, run the script and relocate the tmp folder back once it is done.
 

tomexsic

macrumors newbie
Jan 22, 2021
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.
I tried this but failed Can you give me a screenshot of the terminal window that makes this work? Thanks tomexsic
 

revpow

macrumors newbie
Mar 17, 2021
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.
What did I do wrong? I copied and pasted this code into my Terminal and got this response:

zsh: parse error near `do'
 

bogdanw

macrumors 603
Mar 10, 2009
6,115
3,021
I’ve explained that the script is meat to be run in AppleScript (/Applications/Utilities/Script Editor.app)
https://forums.macrumors.com/thread...sion-for-macos-catalina.2195954/post-27855520
I’ve made a video of the whole process and posted an updated script
https://forums.macrumors.com/thread...sion-for-macos-catalina.2195954/post-27873682
I’ve posted the alternative way from Terminal
https://forums.macrumors.com/thread...sion-for-macos-catalina.2195954/post-27865244
I’ve explained several times that “Error 17: File exists” can be solved by renaming or deleting the tmp folder
https://forums.macrumors.com/thread...sion-for-macos-catalina.2195954/post-27876810
https://forums.macrumors.com/thread...sion-for-macos-catalina.2195954/post-28119095
 
  • Like
Reactions: SpotOnT and mikzn

thibauta

macrumors newbie
Sep 5, 2021
5
1
I use latest catalina on mbp 2012 and need to connect to an 10 year old system which uses java applets through web browser. Until the swithc to catalina I was able to make it work but now that is gone.
I have downloaded firefox 52 JRE, uninstalled latest java, downloaded Java v6 through the apple link and tried to use the script above to install Java 6. Script runs normally and Java 6 is installed however I can't activate the Java plug ins on FF and when I try to check java 6 installation, I can't see it in the system preferences.
What did i do wrong ?
Please help !
 

bogdanw

macrumors 603
Mar 10, 2009
6,115
3,021
I use latest catalina on mbp 2012 and need to connect to an 10 year old system which uses java applets through web browser. Until the swithc to catalina I was able to make it work but now that is gone.
I have downloaded firefox 52 JRE, uninstalled latest java, downloaded Java v6 through the apple link and tried to use the script above to install Java 6. Script runs normally and Java 6 is installed however I can't activate the Java plug ins on FF and when I try to check java 6 installation, I can't see it in the system preferences.
What did i do wrong ?
Please help !
The Java SE 6 web plug-in is not included in this package.
See https://support.apple.com/en-in/HT202643 or install Java SE 7
 

thibauta

macrumors newbie
Sep 5, 2021
5
1
Thank you Bogdan

I get an error message at the last step:
Thibauts-MacBook-Pro:~ thibautadam$ sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws
ln: /usr/bin/javaws: Operation not permitted

any idea ?
Will try Java SE 7 in the meanwhile
 

thibauta

macrumors newbie
Sep 5, 2021
5
1
Just tried loading Java SE 7 and it finally works. many thanks Bogdan !
Although Java launches correctly I have a functionality problem.
The mini java site that I need to use has a number of buttons which are enabled by filling in some information. Although I do fill them in correctly the button says ‘gray’ and I can’t access what I need.

I have tried both firefox 52 and waterfox classic, same problem.
I even tried booting off an usb stick with Mojave and same problem occurs.

I can’t see what creates the problem and more importantly how to fix it. Any help is appreciated !
 

bogdanw

macrumors 603
Mar 10, 2009
6,115
3,021
Although Java launches correctly I have a functionality problem.
The mini java site that I need to use has a number of buttons which are enabled by filling in some information. Although I do fill them in correctly the button says ‘gray’ and I can’t access what I need.

I have tried both firefox 52 and waterfox classic, same problem.
I even tried booting off an usb stick with Mojave and same problem occurs.

I can’t see what creates the problem and more importantly how to fix it. Any help is appreciated !
It's very hard for someone to help without testing the same configuration.
On Catalina 10.15.7, I was able to get the happy face on this page https://www.math.uh.edu/mathonline/JavaTest/JavaTestPage.htm with:
- Firefox ESR 50 (Firefox update and plugins/add-ons updates disabled) https://ftp.mozilla.org/pub/firefox/releases/52.0esr/mac/en-US/
- Java SE 7 jre-7u80-macosx-x64.dmg MD5 Checksum bc48fe6057c51cfa92bdffb98950a176 https://www.oracle.com/webfolder/s/digest/7u80checksum.html
(Java update disabled)
- Security set to Medium in Java Control Panel.
You can also try to add your site to the Exception Site List in the same Security tab.
With the same configuration, this page also worked http://www.stat.cmu.edu/~hseltman/javatest/ this one did not https://javatester.org/version.html
Just to be clear for anyone else reading, this problem is not related to the legacy Java 6 runtime (Java for OS X 2017-001).
 

thibauta

macrumors newbie
Sep 5, 2021
5
1
Hi Bogdan
they all work except the last one
It shows an error

more importantly, I have established that the problem I was experiencing was coming from the Java device itself, not the mac set up I was using to access it.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.