I know that Java is pre-installed in Mac OS X but i wonder if it is pre-installed in Windows XP, Vista, 7 and all Linux distros?
Java isn't preinstalled in any Windows version (OEM not included - depends on the manufacturer then).
I think it is not common in Linux distributions at all, but I don't want to make a general statement about ALL distros here ;-)
Some Linux versions I experienced comes with old versions of Java JDK (so you must take care developing for these distributions!) or with an alternative version of the compiler: Gnu Compiler Java (GCJ).
About the virtual machine, I've just seen the JVM in Windows and Linux, provided by Sun.
I understand that the vast majority of PCs come with the Sun JRE installed. There was a bit of a law suite between Microsoft and Sun (my employer, now a wholly owned subsidiary of Oracle).
The "6-open" OpenJDK is a backport of the GPLed JDK7. General purpose distros should include it, but of course with Linux you are fighting with package management.