Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试像这样在 Jasmin 中实例化一个类:
new Ljava/lang/Object; dup invokespecial java/lang/Object/<init>()V
这确实编译但类 vierifier 抱怨:
“VerifyError:调用错误的初始化方法。”
实例化类的正确方法是什么?
啊,我发现了他妈的问题:
'new' 的参数应该是类型的普通限定名,而不是修饰名。IE。代替
new Ljava/lang/Object;
你应该写:
new java/lang/Object
工作代码是:
new java/lang/Object dup invokespecial java/lang/Object/<init>()V
尝试使用invokespecial java/lang/Object/()V.
invokespecial java/lang/Object/()V