Set up JAVA_HOME to track Java Preferences.app on Mac OS X

/Applications/Utilities/Java Preferences.appMac OS X’s Java Preferences.app has a pane for switching between versions of the JDK, but I just found out from a coworker (thanks, Mike!) that you can make your shell match that preference easily — just add this to your ~.bashrc:

If you change your JDK priority preference, you’ll need to re-source your ~/.bashrc or just open a new terminal window.

Tagged with: , , , , ,
Posted in Technical HOWTOs
  • Trenton

    That’s a good one. Other stuff to share from my rc:

  • http://matthew.mceachen.us matthew

    NICE