Win7,需要查看运行java.exe进程的详细命令行信息
[请阅读所有这些内容 - 我意识到这个问题已经被问到了,但之前的答案对我来说不起作用。]
在 Win7 上,对于任何正在运行的 java.exe 进程,我需要查看发出的确切命令行启动该过程。我已经意识到任务管理器通过“命令行”列执行此操作,但如果命令行很长,它最终会截断显示中的文本,并且我无法看到我需要的所有内容。
我知道之前已经有人问过这个问题,并且我已经尝试过 SysInternals Process Explorer,但它没有为我的任何 java.exe 进程的命令行显示任何内容,这与如何许多其他 StackOverflows 答案已经描述过。我也尝试过 JVisualVM 和 jps,但据我所知,这些需要 JMX 或 jstatd 连接,我认为这不适用于我的情况(如果我错了,请纠正我)。我什至从任务管理器创建了一个 DMP 文件并对其进行了调查,但这不仅太过分了,而且没有提供我所需要的东西。
[Please read all of this content - I realize this very question has been asked on SO but no prior answers work for me.]
On Win7, for any java.exe process that's running, I need to see the exact command line that was issued to launch the process. I already realize Task Manager does this with the 'Command Line' column, but if the command line is very long, it eventually truncates the text in the display and I cannot see everything I need.
I know this has been asked before and I have already tried SysInternals Process Explorer but it does not show anything for the command line for any of my java.exe processes, unlike how many other StackOverflows answers have described. I have also tried JVisualVM and jps, but from what I can tell, these require a JMX or jstatd connection, which I don't think apply in my case (please correct me if I'm wrong). I have even gone as far as creating a DMP file from Task Manager and investigating it, but this, in addition to being overkill, did not provide me what I needed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我假设您不需要 Java 解决方案,所以我们开始吧。我记得不久前在 Raymond Chen 的精彩博客上读到过这一点(我真的记得一个 1 1/2 岁的人每周发布 3 个以上帖子的博客文章吗?令人震惊〜)
所以 我们开始,我认为他的警告对于java程序来说甚至都不重要,因为你只得到字符串,这意味着a)它们已经被复制了,b)你无法访问原始数据并因此更改它(注意:纯粹的猜测)。
沿着这条线的东西应该可以工作(可能使用 ExecutionPath 而不是名称,你应该能够找到适合你的东西):
Ok I'll just assume that you won't need a Java solution, so here we go. I remembered reading about that at Raymond Chens great blog some time ago (did I really remeber a 1 1/2 yr old blog post of a guy that posts 3+ posts a week? alarming~)
So here we go, I think his warning doesn't even matter for java programs since you only get strings which means that a) they were already copied and b) you can't access the raw data and therefore change it (note: pure speculation).
Something along this lines should work (probably use ExecutionPath instead of name, you should be able to figure the right thing out for you):