ciaodarwin
ciaodarwin

Reputation: 481

Java - Compile .class file to readable file

I made a big error and I need your help:

I work on a project for the school with java and I made a big error!

I sent to me only the *.class files and deleted the other files(I work in my school with VM).. Is there a way to compile these .class files to .java files?

Thanks

Upvotes: 2

Views: 423

Answers (6)

KhAn SaAb
KhAn SaAb

Reputation: 5366

Dont Worry download DJ Java Decompiler 3.7 download only this version.

Upvotes: 0

Ahmet Karakaya
Ahmet Karakaya

Reputation: 10139

I preper using JD-GUI. You can download from link http://java.decompiler.free.fr/?q=jdgui

Upvotes: 0

JDGuide
JDGuide

Reputation: 6525

You need to decompile your class file. But, after decompile you also need some necessary changes to get your original java file. Try this.

Upvotes: 0

Steve
Steve

Reputation: 7271

Try the Java Decompiler. It should be able to reverse your .class files.

You can also try Show my code if you don't mind submitting your .class files online.

You should be aware that different decompilers may give different results, so trying different ones may be helpful. See Choose and test java decompiler

Upvotes: 2

AlexR
AlexR

Reputation: 115328

The utility you need is called java decompiler. There are several available.

Try JAD from command line. You can also install plugin for eclipse.

And BTW if you are on windows is it possible that your source files are in recycle bin? Or if you are using eclipse try to check the eclipse local history (right click on your project and choose "Restore from local history")

Upvotes: 0

PSR
PSR

Reputation: 40318

You need to use decompiler for that not the compiler.

First decompile using decompiler and then do some changes what ever you needed and then again compile it.Than your problem will solve

SEE HERE

Upvotes: 3

Related Questions