<div dir="ltr">Hi everyone,<div><br></div><div>I've been working on a project where I compile custom code to class files and load them using <font face="monospace">MethodHandles.Lookup#defineHiddenClass</font><font face="arial, sans-serif"> into the jvm. This seems like the correct method to me as my classes don't need to be referenced from the outside beyond reflectively calling a single method and they should ideally unload soon after unless they stored references somewhere.</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">As for the bug, it involves lambdas that capture </font><font face="monospace">this</font><font face="arial, sans-serif"> and a </font><font face="monospace">ClassNotFoundException</font><font face="arial, sans-serif"> being thrown for the hidden class. As far as I understand it, the </font><span style="font-family:arial,sans-serif">hidden</span> <font face="arial, sans-serif">class gets a randomized name at runtime and all references to itself within the class file should be replaced. It seems like this process doesn't work properly for the main </font><font face="monospace">NameAndType</font><font face="arial, sans-serif"> of an </font><font face="monospace">invokedynamic</font><font face="arial, sans-serif"> instruction. This would then cause a runtime crash whenever capturing lambdas among other uses of indy are used.</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Does anyone have any ideas on what I could have done wrong or where I should take this question further? I assume there's some more appropriate mailing list to discuss this issue in.</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Regards, Matias</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><br></font></div></div>