首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >调试时用java 8在ClassLoader上破坏Eclipse

调试时用java 8在ClassLoader上破坏Eclipse
EN

Stack Overflow用户
提问于 2015-01-23 20:47:03
回答 1查看 2.4K关注 0票数 3

在我的一些项目中,我迁移到了java 8,并注意到每个设置为使用java 8运行的项目在调试时都会中断。

当我以调试模式运行项目时,Eclipse只是在第436行的类ClassLoader中中断,这是synchronized的结束大括号。

下面是jre lib中类代码的一部分

代码语言:javascript
复制
protected Class<?> loadClass(String name, boolean resolve)
    throws ClassNotFoundException
{
    synchronized (getClassLoadingLock(name)) {
        // First, check if the class has already been loaded
        Class<?> c = findLoadedClass(name);
        if (c == null) {
            long t0 = System.nanoTime();
            try {
                if (parent != null) {
                    c = parent.loadClass(name, false);
                } else {
                    c = findBootstrapClassOrNull(name);
                }
            } catch (ClassNotFoundException e) {
                // ClassNotFoundException thrown if class not found
                // from the non-null parent class loader
            }

            if (c == null) {
                // If still not found, then invoke findClass in order
                // to find the class.
                long t1 = System.nanoTime();
                c = findClass(name);

                // this is the defining class loader; record the stats
                sun.misc.PerfCounter.getParentDelegationTime().addTime(t1 - t0);
                sun.misc.PerfCounter.getFindClassTime().addElapsedTimeFrom(t1);
                sun.misc.PerfCounter.getFindClasses().increment();
            }
        }
        if (resolve) {
            resolveClass(c);
        }
        return c;
    } // <-- This is line 436 where it breaks just right after I click on the debug mode
} 

然后我不得不点击play,一切都进行得很好,但是每次我想调试一个让我发疯的应用程序时,都要这么做。试图找到任何与此相关的东西但却没有运气。

我还检查了断点视图,并有任何。还检查了Skip all breakpoints按钮,但似乎什么也没有发生。

还可以下载一个新的干净的Eclipse,而且还在继续。

这是一个截图:

EN

回答 1

Stack Overflow用户

发布于 2017-11-27 10:36:19

我通过禁用步骤过滤来修复它。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28118467

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档