Exception in thread "main" java.lang.IllegalArgumentException: Attempt to use non-static field with ReferenceType
我跟踪如下代码:
if(!var5.isStatic()) {
throw new IllegalArgumentException("Attempt to use non-static field with ReferenceType");
}
我的班级是:
public class App {
private String version;
private int system;}
我知道不是静态的,但是我想获取版本的值,但是值的类型是 com.sun.jdi.ObjectReference,那么我怎样才能获取版本的值呢?