简体   繁体   English

如何区分从不同目录启动的相同jar?

[英]How to distinguish same jars started from different directories?

I started several (eight) jar files with the same name from different directories and different config files.我从不同的目录和不同的配置文件中启动了几个(八个)具有相同名称的 jar 文件。

Now I have to kill a specific one.现在我必须杀死一个特定的人。 But neither jps and ps gives enough information to distinguish them.但是 jps 和 ps 都没有提供足够的信息来区分它们。 How could I find out which java process was started from which directory?我怎么能找出哪个java进程是从哪个目录启动的?

Platform : linux (ubuntu server)平台 : linux (ubuntu 服务器)

from the man page it says: use option e to show the environment variables after the command.从手册页它说:使用选项 e 在命令后显示环境变量。 so try using the 'e' option: ps e所以尝试使用“e”选项: ps e

you can then look for PWD variable.然后您可以查找 PWD 变量。 I hope this will help.我希望这将有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM