Oracle Java on Windows

Added a page with tips regarding Oracle Java on Windows. These tips are sadly necessary because Oracle keeps defaulting Windows users to a 32-bit JRE that installs a dangerous and useless browser plugin, attempts to install obnoxious paid crapware, and lacks the modern Server VM to boot. The simplest workaround is to manually download the … Continue reading “Oracle Java on Windows”

Core Java & Well-Grounded Java

Core Java, Volume I: Fundamentals — Cay S. Horstmann & Gary Cornell, Prentice Hall (Oracle) 2012 (9th ed. for Java SE 7), ISBN 978-0-13-708189-9 Core Java, Volume II: Advanced Features — Cay S. Horstmann & Gary Cornell, Prentice Hall (Oracle) 2013 (9th ed. for Java SE 7), ISBN 978-0-13-708160-8 These books have been superseded by … Continue reading “Core Java & Well-Grounded Java”

Disabling the Java Browser Plugin

Oracle keeps shipping a web browser plugin with its Java Runtime Environment (JRE), even though it’s a notoriously useless malware magnet (see below). Most legitimate Java client applications found on the Internet today are intended for offline installation. These often come bundled with a private JRE, and always completely ignore the browser plugin. So the … Continue reading “Disabling the Java Browser Plugin”

Avoiding the Java Client VM

When Java applications perform poorly on Windows, Java developers blame Windows and Windows developers blame Java. But most likely, the actual cause is using the wrong virtual machine. Oracle ships two VMs for 32-bit platforms, called Client VM and Server VM, and Windows defaults to the slower one. My new article on Java Client VM … Continue reading “Avoiding the Java Client VM”

Robert Sedgewick’s Algorithms

Algorithms — Robert Sedgewick and Kevin Wayne, Addison-Wesley 2011 (4th ed.), ISBN 978-0-321-57351-3 This single volume replaces Sedgewick’s two-volume classic Algorithms in C/C++/Java (long among my favorite programming books), now without the language designator since Java is used exclusively. The associated booksite offers a chapter overview, excerpts from the printed text, dynamic visualizations, some exercise … Continue reading “Robert Sedgewick’s Algorithms”

Myriarch Implementation Notes

As there is currently no proper PDF manual for Myriarch, here are some noteworthy implementation details. This post originally covered the .NET version (released 09/2012) but has been revised for the new Java version (released 06/2017). Unit Orders The core simulation uses the QuadTree class of my Tektosyne library to locate units and their neighbors. … Continue reading “Myriarch Implementation Notes”

Java adds numbers really fast

Daniel Lemire has posted a tiny benchmark for a basic part of many numerical applications: a loop that sums up numbers in an array. The astonishing part is the performance of Oracle Java 7 which dramatically outperforms an older GCC version, and keeps up quite well with newer compilers! I tested the same code against … Continue reading “Java adds numbers really fast”

Uncontested Lock Performance

Recently I wondered about the performance cost of preemptively putting monitor locks on small library methods that might conceivably be called from multiple threads. That’s a great subject for a micro-benchmark, so I wrote a few tests in C# and Java and posted the results in Uncontested Lock Performance. As it turns out, standard locking … Continue reading “Uncontested Lock Performance”