How to view shell commands used by eclipse “run configurations”

这一生的挚爱 提交于 2019-12-02 16:36:41

This should work for Java and Maven processes. You can get the command line from the Process properties.

  • run the process in debug mode
  • right click on the process item in the "Debug" view and choose "Properties"
  • the command line is displayed

Another trick if you're running on a Unix OS (although you have to be snappy about this...) is to initiate your Run.. within Eclipse and then switch over to a command prompt and run this command (Mac syntax):

ps -ef | grep java

This will print out the command line Java process invocations that are currently running. Look for the one that corresponds to your Eclipse process (check the main class, which is the last parameter on the command line) and voila!

thanks so much splash. one thing to add-- i was getting a weird error at the commandline:

ERROR: transport error 202: connect failed: Connection refused ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:708] FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197) Aborted!

this can be avoided by just taking out the agentlib argument:

-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:56431

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!