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

1.1k views Asked by At

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

enter image description here

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

enter image description here

I am using STS 4.8.x
enter image description here

1

There are 1 answers

0
howlger On BEST ANSWER

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.