I am invoking my java code via Eclipse External Tools as an ant target.
I want to monitor the JVM with JMC (Mission Control) and hence start up the Eclipse External Tools with arguments:
"-XX:+UnlockCommercialFeatures -XX:+FlightRecorder"
.
However, when I run it, the first error in the log file is:
"Unknown argument: -XX:+UnlockCommercialFeatures -XX:+FlightRecorder"
Also, when I run the flight recorder on this process, it complains:
"Flight Recorder features are not enabled. To enable this you need to use a Java 7u4 or later JVM started with -XX:+UnlockCommercialFeatures -XX:+FlightRecorder."
Looks like I am not setting the args in the correct place in eclipse.
Edit after the answer: If I invoke Java from commandline it looks fine, but when I invoke from eclipse external tools, that is the issue. Attached screenshot.Eclipse External Tools invoked with JVM args for JMC