WORA : Java Glossary
©1996-2017 Roedy Green of Canadian Mind Products
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.
- In browsers there are dozens of different incompatible security systems.
- Netscape is really off in left field. Not even HttpURLConnection works the
same. Internet Explorer is so far out, they can’t even legally call it
- Threads rely on the underlying OS.
You can’t even count on round robin scheduling of equal priority
- You can’t count on many standard fonts being available or for them to
have standard metrics. You can’t count on Unicode characters being
- On some platforms the elements of the classpath are separated by semicolons,
and others by colons. There was no need for this variety, since classpath is a
purely Java invention.
- Each implementation has different bugs in the compilers,
JVM (Java Virtual Machine)
s and class libraries to dodge.
- If your code is written for Java 1,7 you must have a Java 1.7+ runtime. It
might not be available for a given platform.
- If you use JNI, you must have the appropriate native code for the