© 2017

Java 9 Recipes

A Problem-Solution Approach


  • Provides fast solutions to common programming problems in Java

  • Covers modularity, the JShell, and other new aspects of Java 9

  • Explains the new approach to garbage collection

  • Includes enhanced JSON and JavaServer Faces content


Table of contents

  1. Front Matter
    Pages i-l
  2. Josh Juneau
    Pages 1-34
  3. Josh Juneau
    Pages 35-46
  4. Josh Juneau
    Pages 47-64
  5. Josh Juneau
    Pages 65-98
  6. Josh Juneau
    Pages 99-136
  7. Josh Juneau
    Pages 137-157
  8. Josh Juneau
    Pages 159-193
  9. Josh Juneau
    Pages 195-219
  10. Josh Juneau
    Pages 221-237
  11. Josh Juneau
    Pages 239-266
  12. Josh Juneau
    Pages 267-284
  13. Josh Juneau
    Pages 305-353
  14. Josh Juneau
    Pages 355-427
  15. Josh Juneau
    Pages 429-469
  16. Josh Juneau
    Pages 471-497
  17. Josh Juneau
    Pages 529-551
  18. Josh Juneau
    Pages 553-561

About this book


Quickly find solutions to dozens of common programming problems encountered while building Java applications. Content is presented in the popular problem-solution format. Look up the programming problem that you want to resolve. Read the solution. Apply the solution directly in your own code. Problem solved!

This revised edition covers important new features such as Java 9's jShell and the new modularity features enabling you to separate code into independent modules that perform discrete tasks. Also covered are the new garbage collection algorithm and completely revamped process API. Enhanced JSON coverage is provided as well as a new chapter on JavaServer Faces development for web applications. 

What You Will Learn:
  • Develop Java SE applications using the latest in Java SE technology
  • Exploit advanced features like modularity and lambdas
  • Utilize the jShell to quickly develop solutions
  • Build dynamic web applications with JavaScript and Project Nashorn
  • Create great-looking web interfaces with JavaServer Faces
  • Generate graphics and work with media such as sound and video
  • Add internationalization support to your Java applications


Java JavaServer Faces XML JShell Lambda Internationalization JavaFX Nashorn JSON Modularity

Authors and affiliations

  1. 1.HinckleyUSA

About the authors

Josh Juneau has been developing software and enterprise applications since the early days of Java EE. Application and database development have been his focus since the start of his career. He became an Oracle database administrator and adopted the PL/SQL language for performing administrative tasks and developing applications for the Oracle database. In an effort to build more complex solutions, he began to incorporate Java into his PL/SQL applications and later developed standalone and web applications with Java. Josh wrote his early Java web applications utilizing JDBC and servlets or JSP to work with backend databases. Later, he began to incorporate frameworks into his enterprise solutions, such as Java EE and JBoss Seam. Today, he primarily develops enterprise web solutions utilizing Java EE and other technologies. He also includes the use of alternative languages, such as Jython and Groovy, for some of his projects.

Over the years, Josh has dabbled in many different programming languages, including alternative languages for the JVM, in particular. In 2006, Josh began devoting time to the Jython Project as editor and publisher of the Jython Monthly newsletter. In late 2008, he began a podcast dedicated to the Jython programming language. Josh was the lead author for The Definitive Guide to Jython, Oracle PL/SQL Recipes, and Java 7 Recipes, and a solo author of Java EE 7 Recipes and Introducing Java EE 7, which were all published by Apress. He works as an application developer and system analyst at Fermi National Accelerator Laboratory, and he also writes technical articles for Oracle and OTN.  He was a member of the JSR 372 and JSR 378 expert groups, and is an active member of the Java Community, helping to lead the Chicago Java User Group’s Adopt-a-JSR effort.

When not coding or writing, Josh enjoys spending time with his wonderful wife and five children, especially swimming, fishing, playing ball, and watching movies. To hear more from Josh, follow his blog at You can also follow him on Twitter at @javajuneau.

Bibliographic information

Industry Sectors
IT & Software
Finance, Business & Banking


“This book covers the essential new features of the Java language. … this book will help readers ‘quickly find solutions to dozens of common programming problems encountered while building Java applications.’ I think it’s good for all levels of readers. Overall, it is a helpful book.” (Computing Reviews, November, 2017)