mirror of
https://github.com/alibaba/arthas.git
synced 2026-11-12 22:41:26 +00:00
update doc
This commit is contained in:
1 parent
72e97ebc10
commit
9a7cef6f87
10 files changed
+142
-7
No files matched your search
@@ -56,7 +56,7 @@ $ java -jar arthas-boot.jar -h
|
||||
|
||||
## Offline Help Documentation
|
||||
|
||||
Latest Version, Click To Download:[](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=doc&v=LATEST)
|
||||
Latest Version, Click To Download:[](https://github.com/alibaba/arthas/releases/download/arthas-all-3.0.5/arthas-3.0.5-doc.zip)
|
||||
|
||||
|
||||
## Uninstall
|
||||
|
||||
@@ -21,3 +21,34 @@ Reference: [Instrumentation#redefineClasses](https://docs.oracle.com/javase/8/do
|
||||
redefine -p /tmp/Test.class
|
||||
redefine -c 327a647b -p /tmp/Test.class /tmp/Test$Inner.class
|
||||
```
|
||||
|
||||
### Restrictions of the redefine command
|
||||
|
||||
* New field/method is not allowed
|
||||
* The function that is running, no exit can not take effect, such as the new `System.out.println` added below, only the `run()` function will take effect.
|
||||
|
||||
```java
|
||||
public class MathGame {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
MathGame game = new MathGame();
|
||||
while (true) {
|
||||
game.run();
|
||||
TimeUnit.SECONDS.sleep(1);
|
||||
// This doesn't work because the code keeps running in while
|
||||
System.out.println("in loop");
|
||||
}
|
||||
}
|
||||
|
||||
public void run() throws InterruptedException {
|
||||
// This works because the run() function ends completely every time
|
||||
System.out.println("call run()");
|
||||
try {
|
||||
int number = random.nextInt();
|
||||
List<Integer> primeFactors = primeFactors(number);
|
||||
print(number, primeFactors);
|
||||
|
||||
} catch (Exception e) {
|
||||
System.out.println(String.format("illegalArgumentCount:%3d, ", illegalArgumentCount) + e.getMessage());
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in new issue
Block a user