This commit is contained in:
wangxiang
2023-07-21 19:29:46 +08:00
parent 91b1ef53bf
commit a6352b1c9e
4 changed files with 23 additions and 3 deletions

View File

@@ -30,9 +30,11 @@
### 配置日志输出级别
修改 `simplelogger.properties` 文件中的内容。配置日志输出级别,一般使用 `debug``info`
debug 级别下运行将会非常友好的输出 JVM 正在执行的栈信息
debug 级别下运行将会非常友好的输出 JVM 正在执行的栈信息
![](/readme/20230721180520.png)
info 级别将不会看到任何 haidnorJVM 内部运行信息
### 配置 rt.jar
修改 `haidnorJVM.properties` 文件中的内容。配置 rt.jar 的绝对路径,例如`rt.jar=D:/Program Files/Java/jdk1.8.0_361/jre/lib/rt.jar`

View File

@@ -54,7 +54,7 @@ public class Interpreter {
}
i += instruction.offSet();
}
log.debug("{}└──────────────────", blank);
log.debug("{}└──────────────────[{}] {} | {} ", blank, frameCount + 1, frame.aKlass.getClassName(), frame.getMethod());
frameCount--;
}

View File

@@ -1,5 +1,23 @@
package haidnor.jvm.test.clazz;
public class Student extends Human {
private int count = 1;
public static String school = "Hello World!";
public void method1() {
System.out.println("method1");
method2();
}
public void method2() {
System.out.println("method2");
method3();
}
public void method3() {
System.out.println("method3");
}
}

View File

@@ -6,7 +6,7 @@ public class Demo4 {
public static void main(String[] args) {
Student student = new Student();
System.out.println(Student.school);
student.method1();
}
}