JVM command-line flag argument validation [JEP 245]

In this chapter, you have gained exposure to much of the command-line flag usage with the Java 9 platform. Java Enhancement Proposal 245, titled Validate JVM Command-Line Flag Arguments, was created to ensure all JVM command-line flags with arguments are validated. The primary goals of this effort were:

  • Avoid JVM crashes
  • Provide error messages to inform of invalid flag arguments

As you can see from the following graphic, there was no attempt to auto-correct the flag argument errors; rather, just to identify the errors and prevent the JVM from crashing:

A sample error message is provided ...

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.