DCmd is currently widely used inside hotspot, we can consider extending it to the Java layer so that Java developers can also customize their own commands.
Developers can register commands in a manner similar to the following, and use `jcmd` to execute.
```
Factory.register("My.Date", output -> {
output.println(new Date());
});
jcmd <pid> My.Date
```
For more information, please refer to GitHub issue.
Developers can register commands in a manner similar to the following, and use `jcmd` to execute.
```
Factory.register("My.Date", output -> {
output.println(new Date());
});
jcmd <pid> My.Date
```
For more information, please refer to GitHub issue.
- links to
-
Review openjdk/jdk/5938