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

huangapple go评论86阅读模式
英文:

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

问题

Enhanced Class Decompiler已安装,但我仍然无法将.class文件反编译为.java源代码。

我正在尝试反编译Java核心类 - Collections.class - 有人可以指导我如何解决这个问题吗?

我正在使用STS 4.8.x版本。

英文:

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?

I am trying to decompile java core class - Collections.class - Could some one guide me how to get past this.

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

I am using STS 4.8.x
Enhanced Class Decompiler is installed still I am unable to decompile .class to .java source?

答案1

得分: 1

根本原因是 Spring Tools 4 中嵌入的 JDK 不包含源代码。Spring Tools 4 应用程序附带了一个来自 Eclipse JustJ 的嵌入式 JDK,这是一个新功能,但缺少源代码是一个问题,可能会在即将发布的版本中得到解决(根据 STS4 主要开发者在这条推文中所说)。

作为解决方法(也是解决嵌入式 JDK 缺少源代码问题的变通方法),确保在您的系统中安装了 JDK(而不是 JRE)(如果缺少,可以从 AdoptOpenJDK 下载 JDK),并在Java > Installed JREs首选项中进行配置

使用反编译方法的缺点是将缺少 Javadoc。

英文:

The root cause is that the JDK embedded in the Spring Tools 4 does not contain sources. 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).

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 e.g. from AdoptOpenJDK) and configure it in the preferences in Java > Installed JREs.

Using the decompiler hack has the disadvantage that the Javadoc will be missing.

huangapple
  • 本文由 发表于 2020年10月13日 20:07:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/64334951.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定