-3

I have a file without extension but I used an online site to know the type of this file. It says the file contains "compiled Java class data, version 52.0".

The content of the file that I need to read here

 ˛∫æ4)


  
<init>()VCodeLineNumberTablemain([Ljava/lang/String;)V
StackMapTable
SourceFileHelloWorld.java    
SYNT{SBERAFVPF_101} !"#$%&'(
HelloWorldjava/lang/Objectjava/lang/Stringlength()IcharAt(I)Cjava/lang/SystemoutLjava/io/PrintStream;java/io/PrintStreamprint(C)V!  
*∑± 
«rL=+∂¢g+∂>a°m£
`í>ß?A°M£
`í>ß*n°z£
dí>ßN°Z£  
dí>≤∂Ñߡó±*

I just need to make this file readable and get the output from it What is the encoding type used or is there any online site that can read it.

Ali Abbas
  • 1,415
  • 12
  • 19
  • Try searching the web for a Java class file decompiler and run your file through it and you'll end up with Java source code. – Mark Stewart Apr 17 '19 at 18:01

2 Answers2

2

It's a compiled Java class, not some text with an encoding. Compiling means translating human readable text into instructions a PC can understand. So the file contains such CPU instructions similar to machine code, called "intermediate language" or "byte code".

Use java.exe to run it and see the output. Be aware that running a program of an unknown person is dangerous. It could delete files etc.

You can't get the source code back, but you can use a Java Decompiler to get close to the original.

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
1

The comment

SourceFileHelloWorld.java

suggests this is a Java "Hello, World!" program (e.g.). The long line in the middle

HelloWorldjava/lang/Objectjava/lang/Stringlength()IcharAt(I)Cjava/lang/SystemoutLjava/io/PrintStream;java/io/PrintStreamprint(C)V!

suggests the program prints "HelloWorld." That would be the output.

Trevor Keller
  • 510
  • 2
  • 10