mardi 22 mai 2018

What to use instead of `defineClass` in Java10?

I use method defineClass() from the ClassLoader to define a class from the byte array. I fetch this method using reflection:

ClassLoader.class.getDeclaredMethod(
    "defineClass", String.class, byte[].class, int.class, int.class);

Java10 complains about reflective usage of defineClass.

What should I use instead?





Aucun commentaire:

Enregistrer un commentaire