import{_ as i,o as l,c as d,a as e,b as a,w as o,e as s,d as r,r as t}from"./app.391b0e4e.js";const m={},p=e("h1",{id:"mc",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#mc","aria-hidden":"true"},"#"),s(" mc")],-1),u={href:"https://arthas.aliyun.com/doc/arthas-tutorials?language=en&id=command-mc-retransform",target:"_blank",rel:"noopener noreferrer"},h=e("code",null,"mc-retransform",-1),_=s(" online tutorial"),v=r(`

TIP

Memory compiler, compiles .java files into .class files in memory.

mc /tmp/Test.java

The classloader can be specified with the -c option:

mc -c 327a647b /tmp/Test.java

You can also specify the ClassLoader with the --classLoaderClass option:

$ mc --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader /tmp/UserController.java -d /tmp
Memory compiler output:
/tmp/com/example/demo/arthas/user/UserController.class
Affect(row-cnt:1) cost in 346 ms

The output directory can be specified with the -d option:

mc -d /tmp/output /tmp/ClassA.java /tmp/ClassB.java
`,8),f=s("After compiling the "),b=e("code",null,".class",-1),g=s(" file, you can use the "),k=s("retransform"),x=s(" command to re-define the loaded classes in JVM."),y={class:"custom-container warning"},C=e("p",{class:"custom-container-title"},"WARNING",-1),L=s("Note that the mc command may fail. If the compilation fails, the "),w=e("code",null,".class",-1),N=s(" file can be compiled locally and uploaded to the server. Refer to the "),j=s("retransform"),T=s(" command description for details.");function I(R,V){const c=t("ExternalLinkIcon"),n=t("RouterLink");return l(),d("div",null,[p,e("p",null,[e("a",u,[h,_,a(c)])]),v,e("p",null,[f,b,g,a(n,{to:"/en/doc/retransform.html"},{default:o(()=>[k]),_:1}),x]),e("div",y,[C,e("p",null,[L,w,N,a(n,{to:"/en/doc/retransform.html"},{default:o(()=>[j]),_:1}),T])])])}var B=i(m,[["render",I],["__file","mc.html.vue"]]);export{B as default};