/Library/Java – deleted it, how to restore

javalibraryrestore

I'm having problems with long shutdown times and I read somewhere that deleting /Library/Java would solve it, so I did. It didn't do sh*t.

What was the content of that folder (a screenshot might help), and is there a way to restore it? (sudo rm -r'd it, ftw)

Best Answer

On Mavericks

pse@Fourecks:~$ ll /Library/Java/
total 8
drwxrwxr-x  2 root  admin   68 Oct 23  2013 Extensions/
lrwxr-xr-x  1 root  wheel   48 Oct 23  2013 Home@ -> /System/Library/Frameworks/JavaVM.framework/Home
drwxr-xr-x  3 root  wheel  102 Oct 23  2013 JavaVirtualMachines/
pse@Fourecks:~$ ll /Library/Java/Extensions/
pse@Fourecks:~$ ll /Library/Java/JavaVirtualMachines/
total 0
drwxrwxr-x  3 root  wheel  102 Jun 27  2012 1.7.0.jdk/
pse@Fourecks:~$ ll /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/
total 8
drwxrwxr-x  15 root  wheel   510 Jun 27  2012 Home/
-rw-rw-r--   1 root  wheel  1577 Jun 27  2012 Info.plist
drwxrwxr-x   3 root  wheel   102 Aug  3  2012 MacOS/

So (as long as you don't need the JDK) you might fix this be redoing the symlink:

cd /Library/Java
sudo ln -s /System/Library/Frameworks/JavaVM.framework/Home .