“__ JVM_DefineClass __”是什么?作为一个classloader的位置是什么意思? [英] What does "__JVM_DefineClass__" as a classloader location mean?

查看:1208
本文介绍了“__ JVM_DefineClass __”是什么?作为一个classloader的位置是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在调试的原因是为什么eclipse无法在远程调试动态编译和加载类时加载源代码。我看到我的动态编译的类文件来自 __ JVM_DefineClass __ -verbose:class 。我认为这意味着它们来自JVM堆空间本身,因为编译器将编译的字节输出到缓存编译的字节在内存中的FileManager。



在调试时,源代码看起来似乎是唯一的方法是在源查找路径中指定实际加载的类来自...,如果我指定了目录,它似乎不起作用该类正在编译。我觉得如果我将编译的字节保存到磁盘,源加载可能会工作。



那么,$ $ $ $ $ $ $ $ $ $ $ >意思是我的假设是否正确?

解决方案

这意味着,当通过调用defineClass时,在ProtectionDomain中的CodeSource中不包含位置URL类加载器。这可能是因为类是动态生成的,但也可能是因为ClassLoader在定义类时根本不提供信息。


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?

解决方案

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.

这篇关于“__ JVM_DefineClass __”是什么?作为一个classloader的位置是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆