In File Associations below ".class", you will find another ".class without source". Set your decompiler as default in that. Class files should open in the decompiler now.
Answer from reactiveself on Stack OverflowHi all,
I am having some issues on eclipse in relation to .class files
When I try and open the class I get the message "there is no source file attached to the .class"
This issue suddenly started happening yesterday and I am not sure why. Before I was able to open .class file from our lecturer and edit them to complete their work. I have set the Java build path and tried a variety of solutions offers by the internet but no look.
tried reinstalling eclipse but settings won't revert back to how I had them previously.
Be cool if you can keep your answers as babyish as possible as I am complete Java novice.
Any ideas what I do to resolve this?