Thursday 16 August 2018

Java: Commercial Features are locked.

When you try to execute the jcmd with commercial features, you may get this error.

To resolve the error, launch java application by enabling commercial features.

How to enable commercial features?
Use ‘-XX:+UnlockCommercialFeatures’ to enable commercial features.

For example, below statement enables commercial features for HelloWorld application.
java -XX:+UnlockCommercialFeatures -classpath . HelloWorld

                  (OR)
Unlock the commercial features using process id of the application.
jcmd {PROCESS_ID} VM.unlock_commercial_features

Previous                                                 Next                                                 Home

No comments:

Post a Comment