Software are often times used across platform, Windows, Linux, Mac OS, BSD, etc. The list goes on and on, but there're quite a number of ways to fix the problem. Java, once promised "build once, run anywhere", but it doesn't seem that it's true. There is an article which doesn't relate to cross platform mentioned:
"The cross-platform promise of Java is a lie, I had to find that out the hard way, and the questions regarding Java installation and claims that OS X just didn't start it, together with abysmal performance on Linux, were really discouraging. Cross-platform should mean "build once, run anywhere with no adjustments". It just doesn't work out that way in Java's case though."
Here's the link: http://blog.wolfire.com/2010/04/Reverse-Engineering-Binary-Files.
I've never been a fan of Java, doesn't like the virtual machine it runs during execution. It feels unnatural compared to native executables. Even with Java, you'll need to take care of a lot of details, one of the main "pain" is the file handling and the next line. C can also be cross platform if carefully programmed. Thus, why the extra layer of "virtual machine" that eats away all your resources and performance when the same native executable can achieve the same result? (We'll talk about performance... Next time :) )
Cross platform can also be achieved when one uses cross platform library. The most basic thing to do is to just use ANSI compatible libraries (low level libraries, that is). Also, use more cross platform (AND mature) wrappers when making application, such as wxWidgets, Qt, instead of Cocoa, MFC, .NET etc.
In our case, although the game we're developing will be initially be released on Windows, we use cross platform compatible libraries - Ogre3D, bullet physics, OpenAL, etc. Why? Moving across platform is partially a "requirement" in software industry. Even steam is moving to Mac OS X, and I think they'll be moving to Linux as well (well, one day).