Java installation error

I tried to update my java installation in Mountain Lion, by dowloading and installing latest release from official Java site, but when I try to install it an error something goes wrong:


User uploaded file


Here is the log file content:


Apr 21 15:21:14 iMac-**-Giuseppe.local installd[777]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “JDK 7 Update 21.pkg”." UserInfo=0x7fa5d3465350 {NSFilePath=./postinstall, NSURL=file://localhost/Volumes/JDK%207%20Update%2021/JDK%207%20Update%2021.pkg# javaappletplugin.pkg, PKInstallPackageIdentifier=com.oracle.jre, NSLocalizedDescription=An error occurred while running scripts from the package “JDK 7 Update 21.pkg”.} {

NSFilePath = "./postinstall";

NSLocalizedDescription = "An error occurred while running scripts from the package \U201cJDK 7 Update 21.pkg\U201d.";

NSURL = "file://localhost/Volumes/JDK%207%20Update%2021/JDK%207%20Update%2021.pkg#javaa ppletplugin.pkg";

PKInstallPackageIdentifier = "com.oracle.jre";

}



Please help 😟

iMac, OS X Mountain Lion (10.8.3), 2,4Ghz Intel Core 2 Duo

Posted on Apr 22, 2013 9:18 AM

Reply
21 replies

Aug 29, 2013 6:23 AM in response to Messia

Exactly the same error wit hthe package jdk-7u25-macosx-x64.dmg.

The md5sum of my download is:

$ md5sum jdk-7u25-macosx-x64.dmg

2659c363a24b58457030bf42b302ff77 jdk-7u25-macosx-x64.dmg


Despite i can't find the original md5sum on the page where i down loaded the package from (http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.h tml)-

I don't think this is a corrupted package but rather a postinstall script error or something related.

Aug 29, 2013 1:46 PM in response to Messia

I also tried the beta releases of the JDK 8 for MacOSX from https://jdk8.java.net/download.html


jdk-8-ea-bin-b104-macosx-x86_64-22_aug_2013.dmg


It ends up wit hthe same problem.


Given that the installation works correctly on a freshly installed OS, the postinstall script probably fails on an unexpected already-existing file or directory coming from a previous installation. Unfortunately, i can't imagine reinstall my whole system just to make this script happy.

Aug 29, 2013 1:54 PM in response to duanegris

That was exactly the same for me. Re-installing OS X in very simple and does not affect any of your programs setting or anything else - the computer will be exactly as it was before (minus the error). All you need is internet connection and about 30 minutes. Here are the instructions:


You can use the built-in recovery disk to install a new copy of OS X while keeping your files and user settings intact.

Important: You need to be connected to the Internet to reinstall OS X.

1.Choose Apple menu > Restart. Once your Mac restarts (and the gray screen appears), hold down the Command (⌘) and R keys.

2.If you’re not connected to the Internet, choose a network from the Wi-Fi menu (in the top-right corner of the screen).

3.Select Reinstall OS X, and then click Continue.

4.Follow the onscreen instructions. In the pane where you select a disk, select your current OS X disk (in most cases, it is the only one available).

5.To start the installation, click Install.

Oct 29, 2013 11:57 AM in response to Messia

I fixed this on my installation. I use a "browser proxy" called Choosy as my system's default browser. This allows me to send certain URLs to different browsers based on various rules.


When installing Java, Java tried to install itself into Choosy's plugins folder - a folder that doesn't exist. I temporarily set my system browser to Firefox, re-ran the installer, and everything checked out. At that point I made Choosy my default browser again.


Here was the line in installer.log that tipped me off:


installd[35456]: ./postinstall: LSGetApplicationForInfo() failed with error -10814 while trying to determine the application with bundle identifier com.choosyosx.choosy.


YMMV, hope that helps at least a few people...

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Java installation error

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