Way to statically initialize a class before or during MethodHandle creation, Unsafe crashes JVM
Remi Forax
forax at univ-mlv.fr
Mon Nov 19 03:39:00 PST 2012
On 11/19/2012 12:20 PM, Jochen Theodorou wrote:
> Am 16.11.2012 20:43, schrieb Jochen Theodorou:
>> Am 16.11.2012 17:31, schrieb Remi Forax:
>> [...]
>>> <clinit> is called the first time you call a constructor, a static
>>> method or get/set the value of a static field.
>> Remi I am aware of that, but I cannot simply call a static method, or
>> create an instance of a class that I don't know. As for a static
>> field... that might be save actually, only... what if there is no static
>> field? The example I gave has three at least, but the class could have
>> been written in Java, then there would be no such field and I still need
>> that information from after cinit.
>>
>> I am looking of course for a general purpose solution here....
> seems like Class.forName in the long form is the best for me.
yes.
>
> bye Jochen
>
Rémi
More information about the mlvm-dev
mailing list