Mastering Arthas: How to Use sc and sm Commands to Inspect JVM Classes and Methods
This article explains the Arthas "sc" (Search‑Class) and "sm" (Search‑Method) commands, showing how they list loaded classes and their methods in a JVM, when they are useful, and why they can often be skipped if source code is available.
Arthas is an open‑source Java diagnostic tool.
The focus here is on two simple Arthas commands: sc: short for “Search‑Class”, it lists all classes that have already been loaded into the JVM. sm: short for “Search‑Method”, it lists the methods of the loaded classes.
Both commands are primarily for information gathering. In practice they are of limited utility because if you have access to the source code you can directly inspect classes and methods, making these commands almost unnecessary. When source code is unavailable, you can combine them with the jda decompilation command to view the decompiled source of a class.
The article notes that understanding and being aware of sc and sm is sufficient; they are not essential tools for most debugging scenarios.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
