— A legendary runtime in its time, now a museum piece best admired from a safe distance. If you enjoyed this review, remember: someone somewhere is still System.out.println() -debugging a Java 6 applet in a closed intranet. Pour one out for them.
Java 5 (2004) had introduced generics, enums, and annotations, but the syntax was clunky. Java 6 took a different path: no massive language changes. Instead, Sun Microsystems focused on stability, performance, and tooling . 1. Unmatched Stability Java 6 was the "Toyota Corolla" of runtimes. It didn't crash. Its garbage collection (the G1 collector was experimental; the default was Parallel/Concurrent Mark Sweep) was predictable. For long-running server applications—think WebLogic, WebSphere, or JBoss—you could set -Xmx and -XX:MaxPermSize and walk away for months. Uptime was measured in years, not days. 2. The Scripting Renaissance (JSR 223) One underrated gem: Java 6 introduced a standard scripting API, allowing you to embed JavaScript (Rhino engine) directly into JVM applications. This was revolutionary. Suddenly, you could write configurable business rules in a dynamic language without restarting the JVM. It paved the way for polyglot JVM thinking. 3. Compiler API & Annotation Processing For framework authors, Java 6 was a dream. The javax.tools.JavaCompiler API allowed programs to compile Java code on the fly. More importantly, pluggable annotation processing (JSR 269) matured. This gave us Lombok, Dagger, and better code generators. Without Java 6, modern Spring and Hibernate would have been far more XML-heavy. 4. The @Override Fix A tiny but life-saving change: In Java 5, @Override only worked for methods overriding superclass methods, not interface methods. Java 6 fixed this. If you implemented Runnable.run() without @Override , you'd get a compile error. It caught thousands of silent bugs. 5. JDBC 4.0 No more Class.forName("com.mysql.jdbc.Driver") . The DriverManager could auto-discover drivers from the classpath. It felt like magic after years of boilerplate. The Bad: The Pain of Being Old 1. The Date and Calendar Nightmare Want to add a day to a date? You'd write: java old version
Released: December 11, 2006 End of Public Updates: February 2013 (but lived on in enterprise until 2018+) — A legendary runtime in its time, now