Tag Archives: Java

General Java programming

Core Java 9 for the Impatient

Core Java SE 9 for the Impatient — Cay S. Horstmann, Pearson Addison-Wesley 2017 (2nd ed.), ISBN 978-0-13-469472-6 The Impatient series condenses the traditional monumental Core Java tomes (2,072 pages for Java SE 8) into a single book a quarter the size – 538 pages for Java SE 9, 480 pages for the first edition […]

Java SE 9 First Look

Oracle has finally released Java SE 9, now available on the Oracle Technology Network. As usual the official end-user portal java.com will switch versions later, so for now it still distributes Java SE 8u144. I have yet to install the JDK, as the corresponding NetBeans update was delayed by its transition from Oracle to Apache. […]

Java Performance Notes

There have been several remarkable articles on Java performance issues in the last couple of months. Those links tend to get lost on Twitter, so I wanted to compile them here with brief overviews. All articles are based on the OpenJDK which also underlies Oracle’s distributions. Java and SIMD Piotr Nowojski tests automatic loop vectorization, […]

Myriarch for Java

Myriarch Combat Simulator is now available in an enhanced Java version, with a JavaFX user interface. I removed the download of the original .NET version as it was fairly rudimentary; I had already planned moving to Java at the time and so didn’t bother properly finishing that version. Overview Myriarch attempts a precise real-time simulation […]

Catching Java Assertion Errors

The Java assert statement can be used for conditionally checking program invariants. Assertions are enabled or disabled with the desired level of granularity by Java Virtual Machine flags, as described in the linked guide. So far, so similar to assertion facilities in other languages. However, whereas .NET Debug/Trace.Assert shows and logs a message by default, […]

Tektosyne 6.0.1 on GitHub

Tektosyne 6.0.1, a Java library for computational geometry and pathfinding, is now available for download. There are only a few minor changes compared to the initial Java release, most strictly internal and all related to FindBugs complaints. PointDComparator/X/Y: Implemented Serializable interface for compatibility with serializable collections. This also required default constructors that leave epsilon at […]

Compiling Java Code

This post is a quick introduction aimed at programmers experienced with C# or other languages who are new to Java. It is intended as a companion piece to my article Java for C# Programmers which focuses on language differences. See the “Further Reading” section at the top of that article for the official Oracle tutorials […]

Java StAX Tips

StAX stands for Streaming API for XML APIs, meaning the XML reader and writer that are contained in package javax.xml.stream of the Java standard library. The first tip is to know this API exists and you should use it! The older APIs, Simple API for XML APIs (SAX parser) and Document Object Model APIs (W3C […]

Comment Converter from C# to Java

C# XML comments and Javadoc comments have a large overlap in semantic functionality but annoyingly use a very different syntax. C# XML comments are usually introduced by three slashes /// on each line and use XML elements for semantic information, whereas Javadoc employs standard comment blocks starting with /** (also optionally supported by C# but […]

Java Client VM Remeasured

After upgrading my computer system some months ago and finishing the port of Tektosyne for Java just recently, I decided it’s time to update the measurements on my comparison page for Oracle’s Java Client and Server VMs on Microsoft Windows. As a reminder, the core problem is that any modern Windows system should automatically run […]