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?
When you save your .java file, Eclipse will compile it into a .class file if there are not compiler errors. You can usually find this file in the bin subdirectory of your project. In particular, it will be in bin/org/odata4j/tomcat because you have declared your class to belong to the org.odata4j.tomcat package. Feel free to copy this file anywhere you wish.
Note: You should only use org.odata4j in your package name if you own the odata4j.org domain. Otherwise, you should choose your own package name.
I find my classes files in Project -> Properties -> Java Build Path at field Default output folder. To me the default was 'project-name/target/classes'.