To fully take advantage of running Mission Control in your Eclipse IDE, you need to run Eclipse on a JDK installation.
Attaching to locally running JVMs will only work if you're running with a JDK.
Follow the instructions below to run on a HotSpot JDK.
The easiest way to change the JVM on which to start Eclipse is by modifying the eclipse.ini file. You can also set the -vm on the command line used to start Eclipse. In windows you would typically do that in the shortcut you use to launch Eclipse. Here is an example ini file: -showsplash org.eclipse.platform -vm D:/java/jdk7_40/jre/bin/
You can also configure JVM options by using -vmargs on commandline or eclipse.ini: -showsplash org.eclipse.platform -vm D:/java/jdk7_40/jre/bin/ -vmargs <JVM options on separate lines>
If you use JDK 9 to run Eclipse, the following JVM options are needed for Mission Control to work properly:
-Djdk.attach.allowAttachSelf=true --add-modules=java.xml.bind,java.xml.ws.annotation --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-exports=java.management/sun.management=ALL-UNNAMED --add-exports=java.management/sun.management.counter.perf=ALL-UNNAMED --add-exports=jdk.management.agent/jdk.internal.agent=ALL-UNNAMED --add-exports=jdk.attach/sun.tools.attach=ALL-UNNAMED --add-exports=java.desktop/sun.awt.windows=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=jdk.attach/sun.tools.attach=ALL-UNNAMED
If running on Mac OS, also add:
--add-exports=java.desktop/sun.lwawt.macosx=ALL-UNNAMED
If running on Linux, also add:
--add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED
|