From c316e380b7737eaea895fb63a8857088764c8135 Mon Sep 17 00:00:00 2001 From: hengyunabc Date: Mon, 18 Feb 2019 00:18:26 +0800 Subject: [PATCH] update doc --- site/src/site/sphinx/en/index.md | 2 +- site/src/site/sphinx/en/jad.md | 24 ++++++++++++++++++++++++ site/src/site/sphinx/jad.md | 24 ++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/site/src/site/sphinx/en/index.md b/site/src/site/sphinx/en/index.md index 2bde3983f..8f9326f22 100644 --- a/site/src/site/sphinx/en/index.md +++ b/site/src/site/sphinx/en/index.md @@ -38,8 +38,8 @@ Arthas is built to solve these issues. A developer can troubleshoot production i Contents -------- -* [Installation](install-detail.md) * [Online tutorials(Recommend)](https://alibaba.github.io/arthas/arthas-tutorials?language=en) +* [Installation](install-detail.md) * [Quick start](quick-start.md) * [Advanced usage](advanced-use.md) * [Commands](commands.md) diff --git a/site/src/site/sphinx/en/jad.md b/site/src/site/sphinx/en/jad.md index d5950fad2..f94194739 100644 --- a/site/src/site/sphinx/en/jad.md +++ b/site/src/site/sphinx/en/jad.md @@ -52,6 +52,30 @@ CharSequence { ... ``` +#### Print source only + +By default, the decompile result will have the `ClassLoader` information. With the `--source-only` option, you can print only the source code. Conveniently used with the [mc](mc.md)/[redefine](redefine.md) commands. + +``` +$ jad --source-only demo.MathGame +/* + * Decompiled with CFR 0_132. + */ +package demo; + +import java.io.PrintStream; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Random; +import java.util.concurrent.TimeUnit; + +public class MathGame { + private static Random random = new Random(); + public int illegalArgumentCount = 0; +... +``` + #### Decompile the specified method ```java diff --git a/site/src/site/sphinx/jad.md b/site/src/site/sphinx/jad.md index 99d8d7d24..b98985f01 100644 --- a/site/src/site/sphinx/jad.md +++ b/site/src/site/sphinx/jad.md @@ -52,6 +52,30 @@ CharSequence { ... ``` +#### 反编绎时只显示源代码 + +默认情况下,反编译结果里会带有`ClassLoader`信息,通过`--source-only`选项,可以只打印源代码。方便和[mc](mc.md)/[redefine](redefine.md)命令结合使用。 + +``` +$ jad --source-only demo.MathGame +/* + * Decompiled with CFR 0_132. + */ +package demo; + +import java.io.PrintStream; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Random; +import java.util.concurrent.TimeUnit; + +public class MathGame { + private static Random random = new Random(); + public int illegalArgumentCount = 0; +... +``` + #### 反编译指定的函数 ```java