one of java's strengths is the 'write once, run anywhere'
philosophy, which should probably be "compile once, run anywhere".
With C/C++, you must re-compile your code for each platform you want to run it on, and make sure you send the right .exe for the right system.
with java, you can send the EXACT same source files to everyone, and regardless of their platform/version, it will run (assuming there is a jvm for that platform).
Now, of course it is possible to write code that won't be portable, but why would you do that?