GL Red Book examples ported to Java