<!DOCTYPE html>
< html lang = "en-US" >
< head >
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width,initial-scale=1" >
< meta name = "generator" content = "VuePress 2.0.0-beta.49" >
< style >
:root {
--c-bg: #fff;
}
html.dark {
--c-bg: #22272e;
}
html, body {
background-color: var(--c-bg);
}
< / style >
< script >
const userMode = localStorage.getItem('vuepress-color-scheme');
const systemDarkMode = window.matchMedia & & window.matchMedia('(prefers-color-scheme: dark)').matches;
if (userMode === 'dark' || (userMode !== 'light' & & systemDarkMode)) {
document.documentElement.classList.toggle('dark', true);
}
< / script >
< link rel = "icon" href = "/images/favicon.ico" > < meta name = "viewport" content = "width=device-width, initial-scale=1.0" > < meta property = "og:title" content = "Arthas" > < meta property = "og:image:alt" content = "Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas - alibaba/arthas: Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas" > < meta property = "og:image" content = "/images/arthas_mate_image.png" > < meta property = "og:description" content = "Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas - alibaba/arthas: Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas" > < meta property = "og:image:width" content = "1200" > < meta property = "og:image:height" content = "600" > < meta property = "twitter:image:src" content = "/images/arthas_mate_image.png" > < meta property = "twitter:image:alt" content = "Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas - alibaba/arthas: Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas" > < meta itemprop = "name" content = "Arthas" > < meta itemprop = "image" content = "/images/arthas_mate_image.png" > < meta itemprop = "description" content = "Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas - alibaba/arthas: Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas" > < script >
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?d5c5e25b100f0eb51a4c35c8a86ea9b4";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
< / script > < title > retransform | arthas< / title > < meta name = "description" content = "arthas user document" >
< link rel = "modulepreload" href = "/assets/app.bd2aade7.js" > < link rel = "modulepreload" href = "/assets/retransform.html.90b4d2d3.js" > < link rel = "modulepreload" href = "/assets/retransform.html.2e291e26.js" > < link rel = "prefetch" href = "/assets/index.html.ec74869a.js" > < link rel = "prefetch" href = "/assets/index.html.d3cced9f.js" > < link rel = "prefetch" href = "/assets/index.html.c11a8683.js" > < link rel = "prefetch" href = "/assets/advanced-use.html.d690d46c.js" > < link rel = "prefetch" href = "/assets/advice-class.html.4e93ebd7.js" > < link rel = "prefetch" href = "/assets/agent.html.a02fd5cb.js" > < link rel = "prefetch" href = "/assets/arthas-properties.html.e0301951.js" > < link rel = "prefetch" href = "/assets/arthas3.html.d1633eb8.js" > < link rel = "prefetch" href = "/assets/async.html.17ea43ab.js" > < link rel = "prefetch" href = "/assets/auth.html.37ca6bb5.js" > < link rel = "prefetch" href = "/assets/base64.html.b9530fc8.js" > < link rel = "prefetch" href = "/assets/batch-support.html.a2be35e2.js" > < link rel = "prefetch" href = "/assets/cat.html.42885227.js" > < link rel = "prefetch" href = "/assets/classloader.html.faacf70e.js" > < link rel = "prefetch" href = "/assets/cls.html.af39fd39.js" > < link rel = "prefetch" href = "/assets/commands.html.9dc0463a.js" > < link rel = "prefetch" href = "/assets/contact-us.html.16fb01ac.js" > < link rel = "prefetch" href = "/assets/dashboard.html.0b694615.js" > < link rel = "prefetch" href = "/assets/docker.html.797da397.js" > < link rel = "prefetch" href = "/assets/download.html.a75cd477.js" > < link rel = "prefetch" href = "/assets/dump.html.e5e17e0e.js" > < link rel = "prefetch" href = "/assets/echo.html.922d5af6.js" > < link rel = "prefetch" href = "/assets/faq.html.abd854f1.js" > < link rel = "prefetch" href = "/assets/getstatic.html.77a5a68e.js" > < link rel = "prefetch" href = "/assets/grep.html.75fa6737.js" > < link rel = "prefetch" href = "/assets/groovy.html.bcb88dfe.js" > < link rel = "prefetch" href = "/assets/heapdump.html.5e26a91c.js" > < link rel = "prefetch" href = "/assets/help.html.9365d9ca.js" > < link rel = "prefetch" href = "/assets/history.html.19b5039d.js" > < link rel = "prefetch" href = "/assets/http-api.html.1b6f4877.js" > < link rel = "prefetch" href = "/assets/idea-plugin.html.438f3f13.js" > < link rel = "prefetch" href = "/assets/install-detail.html.cfd3d763.js" > < link rel = "prefetch" href = "/assets/jad.html.45a48802.js" > < link rel = "prefetch" href = "/assets/jvm.html.9e2ef28b.js" > < link rel = "prefetch" href = "/assets/keymap.html.82e95f8e.js" > < link rel = "prefetch" href = "/assets/logger.html.38490b13.js" > < link rel = "prefetch" href = "/assets/manual-install.html.1daf5a51.js" > < link rel = "prefetch" href = "/assets/mbean.html.b5a19b16.js" > < link rel = "prefetch" href = "/assets/mc.html.28a839a5.js" > < link rel = "prefetch" href = "/assets/memory.html.21a8a665.js" > < link rel = "prefetch" href = "/assets/monitor.html.ea7499e3.js" > < link rel = "prefetch" href = "/assets/ognl.html.c55aa597.js" > < link rel = "prefetch" href = "/assets/options.html.da3ef3a3.js" > < link rel = "prefetch" href = "/assets/perfcounter.html.cfebcf2d.js" > < link rel = "prefetch" href = "/assets/profiler.html.cd7e1584.js" > < link rel = "prefetch" href = "/assets/pwd.html.9c92f559.js" > < link rel = "prefetch" href = "/assets/quick-start.html.d9abe6d7.js" > < link rel = "prefetch" href = "/assets/quit.html.3f89724d.js" > < link rel = "prefetch" href = "/assets/redefine.html.8a08813b.js" > < link rel = "prefetch" href = "/assets/release-notes.html.dc8ff1f0.js" > < link rel = "prefetch" href = "/assets/reset.html.1413086f.js" > < link rel = "prefetch" href = "/assets/retransform.html.342303bb.js" > < link rel = "prefetch" href = "/assets/save-log.html.c42ff748.js" > < link rel = "prefetch" href = "/assets/sc.html.f9c5b69c.js" > < link rel = "prefetch" href = "/assets/session.html.6904a40b.js" > < link rel = "prefetch" href = "/assets/sm.html.a212974a.js" > < link rel = "prefetch" href = "/assets/spring-boot-starter.html.e62a7a68.js" > < link rel = "prefetch" href = "/assets/stack.html.a3201354.js" > < link rel = "prefetch" href = "/assets/start-arthas.html.5421937d.js" > < link rel = "prefetch" href = "/assets/stop.html.e7556014.js" > < link rel = "prefetch" href = "/assets/sysenv.html.51ba409a.js" > < link rel = "prefetch" href = "/assets/sysprop.html.480d71dd.js" > < link rel = "prefetch" href = "/assets/tee.html.09a9aee7.js" > < link rel = "prefetch" href = "/assets/thread.ht
< link rel = "stylesheet" href = "/assets/style.372e9f20.css" >
< / head >
< body >
< div id = "app" > <!-- [ --> < div class = "theme-container" > <!-- [ --> < header class = "navbar" > < div class = "toggle-sidebar-button" title = "toggle sidebar" aria-expanded = "false" role = "button" tabindex = "0" > < div class = "icon" aria-hidden = "true" > < span > < / span > < span > < / span > < span > < / span > < / div > < / div > < span > < a href = "/en/" class = "" data-v-2aa8cc94 > <!-- --> < span class = "site-name can-hide" data-v-2aa8cc94 > arthas< / span > < span class = "navbar-version" data-v-2aa8cc94 > v3.6.4< / span > < / a > < / span > < div class = "navbar-items-wrapper" style = "" > <!-- [ --> <!-- ] --> < nav class = "navbar-items can-hide" > <!-- [ --> < div class = "navbar-item" > < a href = "/en/" class = "" aria-label = "HOME" > <!-- [ --> <!-- ] --> HOME <!-- [ --> <!-- ] --> < / a > < / div > < div class = "navbar-item" > < a class = "external-link" href = "/doc/arthas-tutorials.html?language=en&id=arthas-basics" rel = "noopener noreferrer" target = "_blank" aria-label = "ONLINE TUTORIALS" > <!-- [ --> <!-- ] --> < span > ONLINE TUTORIALS< / span > < span > < svg class = "external-link-icon" xmlns = "http://www.w3.org/2000/svg" aria-hidden = "true" focusable = "false" x = "0px" y = "0px" viewbox = "0 0 100 100" width = "15" height = "15" > < path fill = "currentColor" d = "M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z" > < / path > < polygon fill = "currentColor" points = "45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9" > < / polygon > < / svg > < span class = "external-link-icon-sr-only" > open in new window< / span > < / span > <!-- [ --> <!-- ] --> < / a > < / div > < div class = "navbar-item" > < a href = "/en/doc" class = "router-link-active" aria-label = "DOCS" > <!-- [ --> <!-- ] --> DOCS <!-- [ --> <!-- ] --> < / a > < / div > < div class = "navbar-item" > < div class = "navbar-dropdown-wrapper" > < button class = "navbar-dropdown-title" type = "button" aria-label = "SOLUTIONS" > < span class = "title" > SOLUTIONS< / span > < span class = "arrow down" > < / span > < / button > < button class = "navbar-dropdown-title-mobile" type = "button" aria-label = "SOLUTIONS" > < span class = "title" > SOLUTIONS< / span > < span class = "right arrow" > < / span > < / button > < ul style = "display:none;" class = "navbar-dropdown" > <!-- [ --> < li class = "navbar-dropdown-item" > < a class = "external-link" href = "https://cn.aliyun.com/product/aliware/mse?spm=arthas.topbar.0.0.0" rel = "noopener noreferrer" target = "_blank" aria-label = "Microservice solutions" > <!-- [ --> <!-- ] --> < span > Microservice solutions< / span > < span > < svg class = "external-link-icon" xmlns = "http://www.w3.org/2000/svg" aria-hidden = "true" focusable = "false" x = "0px" y = "0px" viewbox = "0 0 100 100" width = "15" height = "15" > < path fill = "currentColor" d = "M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z" > < / path > < polygon fill = "currentColor" points = "45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9" > < / polygon > < / svg > < span class = "external-link-icon-sr-only" > open in new window< / span > < / span > <!-- [ --> <!-- ] --> < / a > < / li > < li class = "navbar-dropdown-item" > < a class = "external-link" href = "https://www.aliyun.com/aliware/txc?spm=arthas.topbar.0.0.0" rel = "noopener noreferrer" target = "_blank" aria-label = "Distributed transaction solutions" > <!-- [ --> <!-- ] --> < span > Distributed transaction solutions< / span > < span > < svg class = "external-link-icon" xmlns = "http://www.w3.org/2000/svg" aria-hidden = "true" focusable = "false" x = "0px" y = "0px" viewbox = "0 0 100 100" width = "15" height = "15" > < path fill = "currentColor" d = "M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z" > < / path > < polygon fill = "currentColor" points = "45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9" > < / polygon > < / svg > < span class = "external-link-icon-sr-only" > open in new window< / span > < / span > <!-- [ --> <!-- ] --> < / a > < / li > < li class = "navbar-dropdown-item" > < a class = "external-link" href = "https://www.aliyun.com/product/ahas?spm=arthas.topbar.0.0.0" rel = "noopener noreferrer" target = "_blank" aria-label = "High-availability solution" > <!-- [ --> <!-- ] --> < span > High-availability solution< / span > < span > < svg class = "external-link-icon" xmlns = "http://www.w3.org/2000/svg" aria-hidden = "true" focusable = "false" x =
retransform -l
retransform -d < span class = "token number" > 1< / span > < span class = "token comment" > # delete retransform entry< / span >
retransform --deleteAll < span class = "token comment" > # delete all retransform entries< / span >
retransform --classPattern demo.* < span class = "token comment" > # triger retransform classes< / span >
retransform -c 327a647b /tmp/Test.class /tmp/Test< span class = "token punctuation" > \< / span > < span class = "token variable" > $Inner< / span > .class
retransform --classLoaderClass < span class = "token string" > ' sun.misc.Launcher$AppClassLoader' < / span > /tmp/Test.class
< / code > < / pre > < div class = "line-numbers" aria-hidden = "true" > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < / div > < / div > < h3 id = "retransform-the-specified-class-file" tabindex = "-1" > < a class = "header-anchor" href = "#retransform-the-specified-class-file" aria-hidden = "true" > #< / a > retransform the specified .class file< / h3 > < div class = "language-bash ext-sh line-numbers-mode" > < pre class = "language-bash" > < code > $ retransform /tmp/MathGame.class
retransform success, size: < span class = "token number" > 1< / span > , classes:
demo.MathGame
< / code > < / pre > < div class = "line-numbers" aria-hidden = "true" > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < / div > < / div > < p > Load the specified .class file, then parse out the class name, and then retransform the corresponding class loaded in the jvm. Every time a < code > .class< / code > file is loaded, a retransform entry is recorded.< / p > < div class = "custom-container tip" > < p class = "custom-container-title" > TIP< / p > < p > If retransform is executed multiple times to load the same class file, there will be multiple retransform entries.< / p > < / div > < h3 id = "view-retransform-entry" tabindex = "-1" > < a class = "header-anchor" href = "#view-retransform-entry" aria-hidden = "true" > #< / a > View retransform entry< / h3 > < div class = "language-bash ext-sh line-numbers-mode" > < pre class = "language-bash" > < code > $ retransform -l
Id ClassName TransformCount LoaderHash LoaderClassName
< span class = "token number" > 1< / span > demo.MathGame < span class = "token number" > 1< / span > null null
< / code > < / pre > < div class = "line-numbers" aria-hidden = "true" > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < / div > < / div > < ul > < li > TransformCount counts the times of attempts to return the .class file corresponding to the entry in the ClassFileTransformer#transform method, but it does not mean that the transform must be successful.< / li > < / ul > < h3 id = "delete-the-specified-retransform-entry" tabindex = "-1" > < a class = "header-anchor" href = "#delete-the-specified-retransform-entry" aria-hidden = "true" > #< / a > Delete the specified retransform entry< / h3 > < p > Need to specify id:< / p > < div class = "language-bash ext-sh line-numbers-mode" > < pre class = "language-bash" > < code > retransform -d < span class = "token number" > 1< / span >
< / code > < / pre > < div class = "line-numbers" aria-hidden = "true" > < div class = "line-number" > < / div > < / div > < / div > < h3 id = "delete-all-retransform-entries" tabindex = "-1" > < a class = "header-anchor" href = "#delete-all-retransform-entries" aria-hidden = "true" > #< / a > Delete all retransform entries< / h3 > < div class = "language-bash ext-sh line-numbers-mode" > < pre class = "language-bash" > < code > retransform --deleteAll
< / code > < / pre > < div class = "line-numbers" aria-hidden = "true" > < div class = "line-number" > < / div > < / div > < / div > < h3 id = "explicitly-trigger-retransform" tabindex = "-1" > < a class = "header-anchor" href = "#explicitly-trigger-retransform" aria-hidden = "true" > #< / a > Explicitly trigger retransform< / h3 > < div class = "language-bash ext-sh line-numbers-mode" > < pre class = "language-bash" > < code > $ retransform --classPattern demo.MathGame
retransform success, size: < span class = "token number" > 1< / span > , classes:
demo.MathGame
< / code > < / pre > < div class = "line-numbers" aria-hidden = "true" > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < / div > < / div > < div class = "custom-container warning" > < p class = "custom-container-title" > WARNING< / p > < p > Note: For the same class, when there are multiple retransform entries, if retransform is explicitly triggered, the entry added last will take effect (the one with the largest id).< / p > < / div > < h3 id = "eliminate-the-influence-of-retransform" tabindex = "-1" > < a class = "header-anchor" href = "#eliminate-the-influence-of-retransform" aria-hidden = "true" > #< / a > Eliminate the influence of retransform< / h3 > < p > If you want to eliminate the impact after performing retransform on a class, you need to:< / p > < ul > < li > Delete the retransform entry corresponding to this class< / li > < li > Re-trigger retransform< / li > < / ul > < div class = "custom-container tip" > < p class = "custom-container-title" > TIP< / p > < p > If you do not clear all retransform entries and trigger retransform again, the retransformed classes will still take effect when arthas stop.< / p > < / div > < h3 id = "use-with-the-jad-mc-command" tabindex = "-1" > < a class = "header-anchor" href = "#use-with-the-jad-mc-command" aria-hidden = "true" > #< / a > Use with the jad/mc command< / h3 > < div class = "language-bash ext-sh line-numbers-mode" > < pre class = "language-bash" > < code > jad --source-only com.example.demo.arthas.user.UserController < span class = "token operator" > > < / span > /tmp/UserController.java
< span class = "token function" > mc< / span > /tmp/UserController.java -d /tmp
retransform /tmp/com/example/demo/arthas/user/UserController.class
< / code > < / pre > < div class = "line-numbers" aria-hidden = "true" > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < / div > < / div > < ul > < li > Use < code > jad< / code > command to decompile bytecode, and then you can use other editors, such as vim to modify the source code.< / li > < li > < code > mc< / code > command to compile the modified code< / li > < li > Load new bytecode with < code > retransform< / code > command< / li > < / ul > < h3 id = "tips-for-uploading-class-files-to-the-server" tabindex = "-1" > < a class = "header-anchor" href = "#tips-for-uploading-class-files-to-the-server" aria-hidden = "true" > #< / a > Tips for uploading .class files to the server< / h3 > < p > The < code > mc< / code > command may fail. You can modify the code locally, compile it, and upload it to the server. Some servers do not allow direct uploading files, you can use the < code > base64< / code > command to bypass.< / p > < ol > < li > < p > Convert the < code > .class< / code > file to base64 first, then save it as result.txt< / p > < div class = "language-bash ext-sh line-numbers-mode" > < pre class = "language-bash" > < code > Base64 < span class = "token operator" > < < / span > Test.class < span class = "token operator" > > < / span > result.txt
< / code > < / pre > < div class = "line-numbers" aria-hidden = "true" > < div class = "line-number" > < / div > < / div > < / div > < / li > < li > < p > Login the server, create and edit < code > result.txt< / code > , copy the local content, paste and save< / p > < / li > < li > < p > Restore < code > result.txt< / code > on the server to < code > .class< / code > < / p > < div class = "language-text ext-text line-numbers-mode" > < pre class = "language-text" > < code > Base64 -d < result.txt > Test.class
< / code > < / pre > < div class = "line-numbers" aria-hidden = "true" > < div class = "line-number" > < / div > < / div > < / div > < / li > < li > < p > Use the md5 command to verify that the < code > .class< / code > files are consistent.< / p > < / li > < / ol > < h3 id = "restrictions-of-the-retransform-command" tabindex = "-1" > < a class = "header-anchor" href = "#restrictions-of-the-retransform-command" aria-hidden = "true" > #< / a > Restrictions of the retransform command< / h3 > < ul > < li > New field/method is not allowed< / li > < li > The function that is running, no exit can not take effect, such as the new < code > System.out.println< / code > added below, only the < code > run()< / code > function will take effect.< / li > < / ul > < div class = "language-java ext-java line-numbers-mode" > < pre class = "language-java" > < code > < span class = "token keyword" > public< / span > < span class = "token keyword" > class< / span > < span class = "token class-name" > MathGame< / span > < span class = "token punctuation" > {< / span >
< span class = "token keyword" > public< / span > < span class = "token keyword" > static< / span > < span class = "token keyword" > void< / span > < span class = "token function" > main< / span > < span class = "token punctuation" > (< / span > < span class = "token class-name" > String< / span > < span class = "token punctuation" > [< / span > < span class = "token punctuation" > ]< / span > args< span class = "token punctuation" > )< / span > < span class = "token keyword" > throws< / span > < span class = "token class-name" > InterruptedException< / span > < span class = "token punctuation" > {< / span >
< span class = "token class-name" > MathGame< / span > game < span class = "token operator" > =< / span > < span class = "token keyword" > new< / span > < span class = "token class-name" > MathGame< / span > < span class = "token punctuation" > (< / span > < span class = "token punctuation" > )< / span > < span class = "token punctuation" > ;< / span >
< span class = "token keyword" > while< / span > < span class = "token punctuation" > (< / span > < span class = "token boolean" > true< / span > < span class = "token punctuation" > )< / span > < span class = "token punctuation" > {< / span >
game< span class = "token punctuation" > .< / span > < span class = "token function" > run< / span > < span class = "token punctuation" > (< / span > < span class = "token punctuation" > )< / span > < span class = "token punctuation" > ;< / span >
< span class = "token class-name" > TimeUnit< / span > < span class = "token punctuation" > .< / span > SECONDS< span class = "token punctuation" > .< / span > < span class = "token function" > sleep< / span > < span class = "token punctuation" > (< / span > < span class = "token number" > 1< / span > < span class = "token punctuation" > )< / span > < span class = "token punctuation" > ;< / span >
< span class = "token comment" > // This doesn' t work because the code keeps running in while< / span >
< span class = "token class-name" > System< / span > < span class = "token punctuation" > .< / span > out< span class = "token punctuation" > .< / span > < span class = "token function" > println< / span > < span class = "token punctuation" > (< / span > < span class = "token string" > " in loop" < / span > < span class = "token punctuation" > )< / span > < span class = "token punctuation" > ;< / span >
< span class = "token punctuation" > }< / span >
< span class = "token punctuation" > }< / span >
< span class = "token keyword" > public< / span > < span class = "token keyword" > void< / span > < span class = "token function" > run< / span > < span class = "token punctuation" > (< / span > < span class = "token punctuation" > )< / span > < span class = "token keyword" > throws< / span > < span class = "token class-name" > InterruptedException< / span > < span class = "token punctuation" > {< / span >
< span class = "token comment" > // This works because the run() function ends completely every time< / span >
< span class = "token class-name" > System< / span > < span class = "token punctuation" > .< / span > out< span class = "token punctuation" > .< / span > < span class = "token function" > println< / span > < span class = "token punctuation" > (< / span > < span class = "token string" > " call run()" < / span > < span class = "token punctuation" > )< / span > < span class = "token punctuation" > ;< / span >
< span class = "token keyword" > try< / span > < span class = "token punctuation" > {< / span >
< span class = "token keyword" > int< / span > number < span class = "token operator" > =< / span > random< span class = "token punctuation" > .< / span > < span class = "token function" > nextInt< / span > < span class = "token punctuation" > (< / span > < span class = "token punctuation" > )< / span > < span class = "token punctuation" > ;< / span >
< span class = "token class-name" > List< / span > < span class = "token generics" > < span class = "token punctuation" > < < / span > < span class = "token class-name" > Integer< / span > < span class = "token punctuation" > > < / span > < / span > primeFactors < span class = "token operator" > =< / span > < span class = "token function" > primeFactors< / span > < span class = "token punctuation" > (< / span > number< span class = "token punctuation" > )< / span > < span class = "token punctuation" > ;< / span >
< span class = "token function" > print< / span > < span class = "token punctuation" > (< / span > number< span class = "token punctuation" > ,< / span > primeFactors< span class = "token punctuation" > )< / span > < span class = "token punctuation" > ;< / span >
< span class = "token punctuation" > }< / span > < span class = "token keyword" > catch< / span > < span class = "token punctuation" > (< / span > < span class = "token class-name" > Exception< / span > e< span class = "token punctuation" > )< / span > < span class = "token punctuation" > {< / span >
< span class = "token class-name" > System< / span > < span class = "token punctuation" > .< / span > out< span class = "token punctuation" > .< / span > < span class = "token function" > println< / span > < span class = "token punctuation" > (< / span > < span class = "token class-name" > String< / span > < span class = "token punctuation" > .< / span > < span class = "token function" > format< / span > < span class = "token punctuation" > (< / span > < span class = "token string" > " illegalArgumentCount:%3d, " < / span > < span class = "token punctuation" > ,< / span > illegalArgumentCount< span class = "token punctuation" > )< / span > < span class = "token operator" > +< / span > e< span class = "token punctuation" > .< / span > < span class = "token function" > getMessage< / span > < span class = "token punctuation" > (< / span > < span class = "token punctuation" > )< / span > < span class = "token punctuation" > )< / span > < span class = "token punctuation" > ;< / span >
< span class = "token punctuation" > }< / span >
< span class = "token punctuation" > }< / span >
< span class = "token punctuation" > }< / span >
< / code > < / pre > < div class = "line-numbers" aria-hidden = "true" > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < / div > < / div > < / div > <!-- [ --> <!-- ] --> < / div > < footer class = "page-meta right-menu-padding" data-v-e0e60120 > < div class = "meta-item edit-link" > < a class = "external-link meta-item-label" href = "https://github.com/alibaba/arthas/edit/master/site/docs/en/doc/retransform.md" rel = "noopener noreferrer" target = "_blank" aria-label = "Edit this page on GitHub" > <!-- [ --> <!-- ] --> < span > Edit this page on GitHub< / span > < span > < svg class = "external-link-icon" xmlns = "http://www.w3.org/2000/svg" aria-hidden = "true" focusable = "false" x = "0px" y = "0px" viewbox = "0 0 100 100" width = "15" height = "15" > < path fill = "currentColor" d = "M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z" > < / path > < polygon fill = "currentColor" points = "45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9" > < / polygon > < / svg > < span class = "external-link-icon-sr-only" > open in new window< / span > < / span > <!-- [ --> <!-- ] --> < / a > < / div > < div class = "meta-item last-updated" > < span class = "meta-item-label" > Last Updated: < / span > <!-- --> < / div > < div class = "meta-item contributors" > < span class = "meta-item-label" > Contributors: < / span > < span class = "meta-item-info" > <!-- [ --> <!-- [ --> < span class = "contributor" title = "email: hengyunabc@gmail.com" > hengyunabc< / span > <!-- --> <!-- ] --> <!-- ] --> < / span > < / div > < / footer > <!-- --> <!-- [ --> <!-- ] --> < / main > <!-- ] --> < / div > <!-- --> <!-- ] --> < / div >
< script type = "module" src = "/assets/app.bd2aade7.js" defer > < / script >
< / body >
< / html >