Georgi D. Georgiev
Georgi D. Georgiev

Reputation: 227

Converting .class file back to text

Alright, I was playing around, making a TicTacToe game in Java and when I finished, compiled, made sure everything worked I tried to copy the files to another directory using the cp command. It took me a few tries to get the arguments right but I succeeded in the end. In the process, however, I did something and now my .java file is binary? Well, it starts with:

cafe babe 0000 0033 006a 0a00 1e00 3207

and then proceeds with similar things 140 lines downwards. Is there a way to revert it back to text?

Upvotes: 3

Views: 9246

Answers (2)

usha
usha

Reputation: 29369

You would still have the .java file. if you want to decompile your .class file, download the decompiler from the following link and open your .class file in the decompiler

http://jd.benow.ca/

Upvotes: 1

user4233758
user4233758

Reputation:

The .java file is the source file. The .class is the java compiled file.

So there is nothing wrong with it.

Upvotes: 4

Related Questions