Nisarg Mehta
Nisarg Mehta

Reputation: 473

After Decompilation My Java File contain Byte Code

I have decompiled jar file using JD GUI Java decompiler . Only one file contain not actual java code it contain byte code ....how to get rid of this?

public String loginAtStartup(String cmd, String dn, String loginId,
String passwd, String tserver, String port, int retry) { 

// Byte code:
    //   0: getstatic
84\011com/ibm/nisource/softphone/SoftPhone:log\011Lorg/apache/log4j/Logger;
    //   3: new 196\011java/lang/StringBuffer
    //   6: dup
    //   7: ldc_w 439
    //   10: invokespecial
201\011java/lang/StringBuffer:<init>\011(Ljava/lang/String;)V
    //   13: getstatic
72\011com/ibm/nisource/softphone/SoftPhone:props\011Ljava/util/Properties;
    //   16: ldc_w 441
    //   19: invokevirtual
185\011java/util/Properties:getProperty\011(Ljava/lang/String;)Ljava/lang/String;
    //   22: invokevirtual
205\011java/lang/StringBuffer:append\011(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   25: ldc_w 443
    //   28: invokevirtual
205\011java/lang/StringBuffer:append\011(Ljava/lang/String;)Ljava/lang/StringBuffer;

and i want to have java code instead of this ...why this bytecode was not converted to Java Code ? and how to get Java Code from this ??

Upvotes: 0

Views: 2461

Answers (1)

Behrang Saeedzadeh
Behrang Saeedzadeh

Reputation: 47913

It could be that the .class file has been obfuscated and some decompilers get confused when they see obfuscated code and cannot decompile the .class file correctly.

Upvotes: 3

Related Questions