Java is known to be portable; compile once, run anywhere.  I know this is often true because I have many times deployed jar or war without any cross-platform troubles.  Still, I am left wondering if this is always true.For example, Swing applications look different between different OS platforms. Also, JDK-1.7 is still a preview release for Mac OS X.So, what are the common problems that prove that Java applications are not entirely cross platform?
What are the main bottlenecks to know about Java portability?
java;operating systems;portability
Swing is platform-dependent to a certain extent.  In addition to the widget themes being different, as you noted, we've had Swing-based applications where the layout is different from platform to platform.  There was also another group I worked in that had some widgets not even show up on certain platforms.  I'm not sure how big a problem this is though, because I'm not sure how much Swing is used anymore.  Eclipse's SWT seems to be a lot more platform-independent, so it seems that Java + GUI doesn't necessarily imply non-portability.Also, any Java code that uses the operating system or makes assumptions about the underlying platform will naturally be less portable, for reasons including (but not limited to):case (in)sensitivity of the filesystemnewline charactersthreads/processes(Many of these can be easily handled by Java APIs -- System.getProperty(line.separator);).As a counterpart to the saying you mentioned, some of the more experienced programmers in my group say that Java is write once, test everywhere.