This is something I find myself doing annually and always need to look it up. I am putting this here to save me a few searches.
sudo keytool -importcert -alias dev -file certfile.cer -keystore /Library/Java/Home/lib/security/cacerts
The password will either be changeme or changeit
References
http://mattfleming.com/node/310 http://www.java-samples.com/showtutorial.php?tutorialid=669