简体   繁体   English

安装了增强类反编译器仍然无法将 .class 反编译为 .java 源代码?

[英]Enhanced Class Decompiler is installed still I am unable to decompile .class to .java source?

Enhanced Class Decompiler is installed still I am unable to decompile .class to .java source?安装了增强类反编译器仍然无法将 .class 反编译为 .java 源代码?

在此处输入图片说明

I am trying to decompile java core class - Collections.class - Could some one guide me how to get past this.我正在尝试反编译 java 核心类 - Collections.class - 有人可以指导我如何解决这个问题。

在此处输入图片说明

I am using STS 4.8.x我正在使用 STS 4.8.x
在此处输入图片说明

The root cause is that the JDK embedded in the Spring Tools 4 does not contain sources.根本原因是 Spring Tools 4 中嵌入的 JDK 不包含源代码。 That the Spring Tools 4 application is shipped with an embedded JDK (from Eclipse JustJ ) is currently a new feature, but the missing sources is an issue that will probably be fixed in an upcoming release ( according to this tweet by the STS4 main developer ). Spring Tools 4 应用程序附带一个嵌入式 JDK(来自Eclipse JustJ )目前是一个新特性,但缺少的源是一个可能会在即将发布的版本中修复的问题(根据 STS4 主要开发人员的这条推文) .

As solution (and workaround for the missing sources of the embedded JDK), make sure a JDK (not a JRE) is installed in your system (if missing, you can download a JDK eg from AdoptOpenJDK ) and configure it in the preferences in Java > Installed JREs .作为解决方案(以及嵌入式 JDK 缺失源的解决方法),请确保系统中安装了 JDK (不是 JRE)(如果缺失,您可以下载 JDK,例如从AdoptOpenJDK下载)并Java中的首选项中进行配置> 安装 JRE

Using the decompiler hack has the disadvantage that the Javadoc will be missing.使用反编译器 hack 的缺点是 Javadoc 将丢失。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM