mirror of
https://github.com/FranzHaidnor/haidnorJVM.git
synced 2026-03-13 21:43:42 +08:00
update
This commit is contained in:
@@ -30,9 +30,11 @@
|
||||
### 配置日志输出级别
|
||||
修改 `simplelogger.properties` 文件中的内容。配置日志输出级别,一般使用 `debug`、`info`
|
||||
|
||||
在 debug 级别下运行将会非常友好的输出 JVM 正在执行的栈信息
|
||||
debug 级别下运行将会非常友好的输出 JVM 正在执行的栈信息
|
||||

|
||||
|
||||
info 级别将不会看到任何 haidnorJVM 内部运行信息
|
||||
|
||||
### 配置 rt.jar
|
||||
修改 `haidnorJVM.properties` 文件中的内容。配置 rt.jar 的绝对路径,例如`rt.jar=D:/Program Files/Java/jdk1.8.0_361/jre/lib/rt.jar`
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ public class Interpreter {
|
||||
}
|
||||
i += instruction.offSet();
|
||||
}
|
||||
log.debug("{}└──────────────────", blank);
|
||||
log.debug("{}└──────────────────[{}] {} | {} ", blank, frameCount + 1, frame.aKlass.getClassName(), frame.getMethod());
|
||||
frameCount--;
|
||||
}
|
||||
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ public class Demo4 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Student student = new Student();
|
||||
System.out.println(Student.school);
|
||||
student.method1();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user