Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting .class file back to text

Tags:

java

javac

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?

like image 509
Georgi D. Georgiev Avatar asked Dec 30 '25 04:12

Georgi D. Georgiev


1 Answers

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

So there is nothing wrong with it.