Set up JAVA_HOME to track Java on Mac OS X

/Applications/Utilities/Java Preferences.appMac OS X’s Java 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.

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

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

  • matthew