You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
arthas/tutorials/katacoda/command-vmoption-en/arthas-demo.md

18 lines
599 B
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

Download `arthas-demo.jar` and start with the `java -jar` command:
`wget https://arthas.aliyun.com/arthas-demo.jar
java -jar arthas-demo.jar`{{execute T1}}
`arthas-demo` is a very simple program that randomly generates integers, performs factorization, and prints the results.
If the generated random number is negative, a error message will be printed.
To make a contrast with using vmoption afterwards, now we use `Ctrl+c`{{execute interrupt}} and the program exit without printing any additional infomation.
Then we start `arthas-demo` again
`java -jar arthas-demo.jar`{{execute T1}}