Pregunta

I am debugging the reason as to why eclipse cannot load the source code when remote debugging dynamically compiled and loaded classes. I am seeing with the -verbose:class argument that my dynamically compiled class files are coming from __JVM_DefineClass__. I assume this to mean that they come from the JVM heapspace itself, as I have the compiler output the compiled bytes into a "FileManager" that caches the compiled bytes in memory.

It seems that the only way for the source to be view-able when debugging is if I specify in the source lookup path where the actual loaded class came from... and it doesn't seem to work if I specify the directory where the class is being compiled from. I feel that if I save the compiled bytes to disk, the source loading might work.

So, what does __JVM_DefineClass__ mean? Is my assumption correct?

¿Fue útil?

Solución

It means a location URL was not included in the CodeSource in the ProtectionDomain when defineClass was called by the ClassLoader. This could be because the class was dynamically generated, but it could also be because the ClassLoader simply didn't provide the information when it defined the class.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top