Updating Java completely with minimal breakage?
I downloaded the latest Java Development Kit from Oracle, and its installer neatly tucked the file away at...
/Library/Java/VirtualMachines/jdk1.7.0_40.jdk.
Which is a nice place for it. Except the Java the command line is using is located at...
/System/Library/Java/VirtualMachines/1.6.0.jdk.
according to java -version. And I want to fix that.
There's more difference between them than the names, unfortunately. The 1.6.0 version bundle has internal folders of Classes, Commands, and Libraries, and a Home folder which contains the more unixy bin, lib, and man folders. By contrast, the 1.7.0 bundle has neither Classes, Commands, nor Libraries, but its Home folder also contains db and jre folders.
To see why this is a problem, I present /System/Library/Frameworks/JavaVM.framework:
drwxr-xr-x 10 root wheel 340 Sep 25 15:26 .
drwxr-xr-x 135 root wheel 4590 Sep 25 04:49 ..
lrwxr-xr-x 1 root wheel 27 Sep 25 15:26 Classes -> Versions/CurrentJDK/Classes
lrwxr-xr-x 1 root wheel 28 Sep 25 15:26 Commands -> Versions/CurrentJDK/Commands
lrwxr-xr-x 1 root wheel 27 Sep 25 15:26 Frameworks -> Versions/Current/Frameworks
lrwxr-xr-x 1 root wheel 24 Sep 25 15:26 Home -> Versions/CurrentJDK/Home
lrwxr-xr-x 1 root wheel 23 Sep 25 15:26 JavaVM -> Versions/Current/JavaVM
lrwxr-xr-x 1 root wheel 29 Sep 25 15:26 Libraries -> Versions/CurrentJDK/Libraries
lrwxr-xr-x 1 root wheel 26 Sep 25 15:26 Resources -> Versions/Current/Resources
drwxr-xr-x 11 root wheel 374 Sep 25 15:26 Versions
Where do I point those symlinks so they don't break Java?
Also, in the /System/Library/Frameworks folder, I have the following frameworks:
JavaDTWGeneration, JavaDirectToWeb, JavaEOAccess, JavaEOApplication, JavaEOControl, JavaEODistribution, JavaEOGeneration, JavaEOInterface, JavaEOInterfaceSwing, JavaEOProject, JavaEORuleSystem, JavaEOTool, JavaFoundation, JavaFrameEmbedding, JavaJDBCAdaptor, JavaJDNIAdaptor, JavaScriptCore, JavaWOExtensions, JavaWOJSPServlet, JavaWebObjects, JavaWebServicesClient, JavaWebServicesGeneration, JavaWebServicesSupport, and JavaXML beside JavaVM.
It's kind of a mess. Does everyone else have all of these, or did my brief fling with WebObjects left me with a lot of excess baggage? What can I afford to break?
Let's just say that ls -lRa /System/Library/Frameworks/Java* > ~/Downloads/JavaBoilover.txt is ugly.
MacBook Pro, OS X Mountain Lion