• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Decompiling a Java .CLASS file?

clamum

Lifer
I accidentally f'ed up one of the source files to a Java project I have to do for a class. I was trying to tar up some files and forgot the name of the tar file, which ended up being the name of a .java file so it got hosed.

Anyway, I still have the .class file so I would like to try to decompile it instead of re-typing the thing over again. It's not a huge file, but I'm guessing decompiling would be easier.

Does anyone know of any good, and free, software that will do this? Thanks.
 
I think this one has worked for me before but it wasn't on a recent version of java. No idea how it'd handle 1.5. It seems like everyone and his dog wanted to write a decompiler 10 years ago and they've mostly gone out of date 🙁 Being such a simple little tool, I think it should come with the jdk.
 
jad.exe worked for me in the past. It doesn't work too well with 1.5 java (gives some warnings) but the source code appears to be ok.
 
Thanks guys. I tried JAD out and despite a message saying the class file version wasn't supported, JAD converted it to a .java file. I'll have to change around about a quarter of the code but it will be better than re-writing the assignment. 🙂
 
Back
Top