当我启动一个 java 程序时,我可以在任务管理器中看到两个 jvm 实例 运行。我的平台是Windows,IDE是IDEA

When I start a java program, I can see two jvm instance running in the task manager. My platform is Windows, and IDE is IDEA

而且程序退出的时候,还有一个jvm实例,像这样:

第二个jvm实例的作用是什么?

使用"jps":http://docs.oracle.com/javase/7/docs/technotes/tools/share/jps.html

> jps -l
5334 scala.tools.nsc.MainGenericRunner
5853 sun.tools.jps.Jps
5838 /home/reza/.i/tools/sbt-0.13.9/bin/sbt-launch.jar

也许这些问题可以帮助您: How to execute "jps'' command on Windows 8? and How to set java_home on Windows 7?