OSX Mountain Lion and Java

My bash profile defined my JAVA_HOME, and after upgrading to ML I saw this logging in:

This will prompt an install of java

Change the hostname in Mac OSX

When I log into the network at work my Mac’s hostname always turns to:

I have my local hostname set to:

So What I would like to do is set my Mac’s hostname to my local hostname. You can do this all from Terminal in a single line.

Run this command in Terminal:

This is also helpful if you’re in Terminal and have a really long hostname at your prompt. If you want to view your current hostname, run this command in Terminal:

Update (February 13, 2012): Some people have reported that their hostname is not updating. Please try closing your current Terminal session and starting up a new one. Then type “hostname” and you should see your changes.

This is what it looked like for me: