Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8327246

Add a jcmd diagnostic command to list the jar files loaded by a process

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • hotspot
    • svc

      This is a request to add a new diagnostic command to the jcmd tool that can list the "jar files" loaded and used by a running process. There is an existing command to see the list of loaded classes but none to get the list of loaded jar files.

      On Linux, there is an alternate way to get the list of jar files by using "lsof":

      % lsof -p 1022226 | grep jar
      java 1022226 pobajaj mem REG 8,1 67062114 38523537 /home/pobajaj/jdks/jdk1.8.0_281/jre/lib/rt.jar
      java 1022226 pobajaj 3r REG 8,1 67062114 38523537 /home/pobajaj/jdks/jdk1.8.0_281/jre/lib/rt.jar

      But this is not a reliable and platform independent way.

            lcable Larry Cable
            poonam Poonam Bajaj Parhar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: