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

Deprecate jstatd for removal

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 24
    • core-svc
    • None
    • low
    • A warning at startup, no other compatibility risk at this time.
    • add/remove command in $JDK/bin
    • JDK

      Summary

      Deprecate jstatd for removal in a future release. This includes the jstatd command-line tool, and the jdk.jstatd module.

      Problem

      jstatd is an RMI server application which monitors HotSpot VMs, and provides an interface to the monitoring tool jstat, which can then be used across a remote RMI connection.

      RMI is not how modern applications communicate. It is an old transport with long term security concerns, and configuration difficulties with firewalls.

      The jstatd tool should be removed. Deprecating and removing jstatd will not affect usage of jstat for monitoring local VMs using the Attach API.

      jstatd was added to the JDK as an experimental feature, before other monitoring tools such as Java Flight Recorder (JFR). JFR and JMX monitoring with e.g. JConsole or Java Mission Control (JMC) are alternatives, although not drop-in replacements. Using remote access to run jstat locally is the exact replacement for jstatd.

      Solution

      We will terminally deprecate the jdk.jstatd module containing the Java classes and the command-line tool.

      Specification

      Terminally deprecate the jdk.jstatd module, by annotating with @Deprecated(since="24", forRemoval=true) the module information file src/jdk.jstatd/share/classes/module-info.java.

      The jstatd tool will print a warning message to System.err on startup:

      WARNING: jstatd is deprecated and will be removed in a future release.

      Draft PR: https://github.com/openjdk/jdk/pull/19658

            kevinw Kevin Walls
            kevinw Kevin Walls
            Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: