WORA (Write Once, Run Anywhere). The Java goal of perfect platform independence. Java
is not perfectly WORA. The problem areas are mostly caused by impedance
mismatch with the underlying operating system:
Java works with platform-specific filenames. Every platform has its own rules
of what a legit filename is. It needs some tools for uniform platform-independent
filenames for internal files. File Choosers can show users native names, without
annoying the Java code with the details.
Simple programs will work fine, but more complex ones must be aware.
Java works with platform-specific \r \n line-ending conventions. You have the
lineSeparator to help, but your code has to deal with \r\n (Windows), \n (Unix) and
\r (Mac) conventions. Ditto encodings.
The Java GUI (Graphic User Interface) is built atop the OS (Operating System)
underlying GUI has plenty of latitude to do things in its own
way. Your program will look different on different platforms. With Swing,
behaviour across platforms is much more predictable since Java handles the
Java is missing many tools for interacting with the operating system. This
means you have to roll your own with platform-specific C/ C++JNI (Java Native Interface) code.