Command line changes on Java 9

Solution Verified - Updated -

Issue

  • When running an application with Java 9, the following error shows up and the application doesn't run:

    Unrecognized VM option 'CMSIncrementalMode'
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit.
    
  • When running an application with Java 9, the following warning shows up, but the application runs:

    Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option UseFastAccessorMethods; support was removed in 9.0
    

    or

    Java HotSpot(TM) 64-Bit Server VM warning: Option CreateMinidumpOnCrash was deprecated in version 9.0 and will likely be removed in a future release. Use option CreateCoredumpOnCrash instead.
    

    or

    [0.007s][warning][gc] -XX:+PrintGC is deprecated. Will use -Xlog:gc instead
    

Environment

  • OpenJDK 9
  • Oracle JDK 9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content