Here is a link to the general guidelines, but I thought I’d post this as a follow-up to my previous post where I go over installing the Java Runtime Environment.
The file that contains the system-wide path info can be found here (at least in Ubuntu Server 12.10):
/etc/environment
And the link has much more information about that kind of stuff.