
Episode notes
In 1991 a Sun Microsystems engineer working on how different computers could talk to each other named his project Oak, after a tree outside the office window. Trademark trouble forced a new name, and the team picked Java, after the Indonesian coffee they were drinking. When Java debuted publicly in 1996, it answered a real mess: every processor and operating system needed its own compiled version of a program. Java's promise of write once, run anywhere worked by compiling code into hardware-neutral bytecode that a Java Virtual Machine installed on each device translates on the fly, which let applets run inside mid-1990s web browsers on any machine.
That translator made early Java slow and memory hungry until just-in-time compilation, including the HotSpot compiler, began caching frequently run code as native machine code. Java also swept up unused memory automatically with garbage collection and deliberately removed pointer arithmetic and multiple inheritance to stop programmers from making catastrophic errors, then added generics in Java 5.0 in 2004 for stricter type checking. Its reach made it a legal prize. Sun sued Microsoft in 1997 over Windows-only extensions and won a $20 million settlement, and after Oracle bought Sun in 2010 it sued Google over Android's use of the Java APIs in an 11-year fight that reached the Supreme Court in 2021.
- A logical memory leak happens when code keeps a reference to an object it never uses again, so the garbage collector cannot clear it.
- The diamond problem, where two parent classes define the same command, is why Java refused multiple inheritance.
- In 2016 researchers proved Java's type system technically unsound through rare edge cases that trick the compiler.
- Google ran Java code on its own Dalvik and later Android runtime engines and copied the structure of 37 API packages.
- The Supreme Court assumed the APIs were copyrightable and still ruled Google's copying fair use, and Java has reached version 26 through OpenJDK.