7

Today I accidentally delete the /usr/libexec/java_home executable on my Mac OS X 10.8.5 (Mountain Lion) while trying to install latest JDK. Then, I realized that homebrew (package manager) and some other apps needs that binary.

Where can I find or recover that file?

1 Answer 1

7

I found the solution. It was just a symlink and original file was still alive in this directory:

/System/Library/Frameworks/JavaVM.framework/

So, simply put back the symlink using the following command:

sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java_home /usr/libexec/.

Update: The System/Library/Frameworks directory holds the framework files which provide interfaces needed to write software for Mac. You can learn more about this directory on official OS X Frameworks documentation.

3
  • What's the System/Library/Frameworks folder do anyway?
    – Pacerier
    Nov 1, 2017 at 20:32
  • Hey @Pacerier, I have updated the answer and added a link for the docs.
    – edigu
    Nov 2, 2017 at 14:14
  • 1
    For me it is Versions/A, no idea why. There is no Versions/Current.
    – trss
    Jul 4, 2018 at 9:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .