1.首先我的eclipse版本是 Version: Photon Release (4.8.0),小伙伴們可以通過 help>>About eclipse IDE 來查看自己的eclipse版本,免得以下教程不適合你的eclipse;
2.接着通過window>>Preferences>>Java>>Decompiler 進行默認反編譯插件的選擇,具體如下圖:
3.通過General>>Editors>>File Associations對*.class進行默認配置,選中后點擊右下角的Default,具體如下圖:
4.通過General>>Editors>>File Associations對*.class without source進行默認配置,選中后點擊右下角的Default,具體如下圖:
5.做完上面的操作后點擊Apply and Close 就大功告成了,如果還不行就重啟eclipse試試看。