How do I get the commandline that started the process

后端 未结 8 1362
小鲜肉
小鲜肉 2020-11-30 10:25

From Java, is it possible to get the complete commandline with all arguments that started the application?

System.getEnv() and System.getPropertie

相关标签:
8条回答
  • 2020-11-30 10:54

    You might want to look into how jps does this. It's a Java program that is able to get the full command line for all Java processes, including full class name of main class and JVM options.

    0 讨论(0)
  • 2020-11-30 10:55

    If you are using solaris as the OS, take a look at "pargs" utility. Prints all the info required.

    0 讨论(0)
提交回复
热议问题