Files
arthas/_sources/mc.md.txt
T
2019-03-05 16:00:34 +08:00

24 lines
582 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
mc
===
> Memory Compiler/内存编译器,编译`.java`文件生成`.class`。
```bash
mc /tmp/Test.java
```
可以通过`-c`参数指定classloader:
```bash
mc -c 327a647b /tmp/Test.java
```
可以通过`-d`命令指定输出目录:
```bash
mc -d /tmp/output /tmp/ClassA.java /tmp/ClassB.java
```
编译生成`.class`文件之后,可以结合[redefine](redefine.md)命令实现热更新代码。
> 注意,mc命令有可能失败。如果编译失败可以在本地编译好`.class`文件,再上传到服务器。具体参考[redefine](redefine.md)命令说明。