In this chapter, you have gained exposure to much of the command-line flag's usage with the Java platform. A concerted effort was taken to ensure all JVM command-line flags with arguments were validated. The primary goals of this effort were to:
- Avoid JVM crashes
- Provide error messages to inform you of invalid flag arguments
As you can see from the following diagram, there was no attempt to autocorrect the flag argument errors; rather, just to identify the errors and prevent the JVM from crashing:
Flag argument errors
A sample error message is provided here and indicates that the flag argument was out of range. This error would be displayed during the flag argument range check that's performed during the JVM's initialization:
exampleFlag UnguardOnExecutionViolation = 4 is outside the allowed range [0 . . . 3]
Here are some...