Java反编译工具体会

    做Java已经有4年多了,Java反编译工具开始是使用小颖,后来使用DJ Java Decompiler(破解版,嘿嘿),后来不能用了,用google一搜,发现大家都开始使用jad+jadclipse了,用了一段时间了,发现真是好用啊。看来要经常跳上井沿goole以下阿,了解一下新动态。

    看jad网站说jad的bug和限制:
    1.包含有内部类,则jad处理构造函数的参数时会出错;
    2.不支持zip和jar包。(注:如果使用Eclipse插件,则很容易得到包中的某个类的反编译代码)
    3.当有标签块,嵌套循环中有break/continue,有goto语句的时候,会提示信息“Couldn't fully decompile method <name>”;当有try-catch-finally语句的时候会提示信息“Couldn't resolve all exception handlers in method <name>”
    4. Currently Jad ignores the contents of the Line Number Table Attribute and the Source File Attribute(不明白什么意思)
    5.JAD不能处理继承信息,总是把java.lang.Object作为两个不同类的通用父类,需要的时候做强制转换
    6.jad对inlined functions处理不好

    jad使用过程中发现

        SharkUtilities.releaseTransaction(t);
        
break  MISSING_BLOCK_LABEL_89;
        Exception exception;
        exception;
        SharkUtilities.releaseTransaction(t);
        
throw  exception;

这个一般是try-catch-finally语句中的

finally ... {
   SharkUtilities.releaseTransaction(t);
}

语句。
    类似于

        Exception ex;
        
if ( ! connected)
            
throw   new  NotConnected( " The connection is not established... " );
        SecurityManager sm 
=  SharkEngineManager.getInstance().getSecurityManager();
        
if (sm  !=   null )
            
try
            
... {
                sm.check_executionadministration_get_sequence_processmgr(t, userId);
            }

            
//  Misplaced declaration of an exception variable
             catch (Exception ex)
            
... {
                
throw   new  BaseException(ex);
            }

        
return  SharkEngineManager.getInstance().getObjectFactory().createProcessMgrIteratorWrapper(t, userId).get_next_n_sequence(t, max_number);
        ex;
        cus.info(
" ExecutionAdmin -> Unexpected error while user tries to get the list of process managers " );
        
throw   new  BaseException(ex);

应该是

    try ... {
        
if ( ! connected)
            
throw   new  NotConnected( " The connection is not established... " );
        SecurityManager sm 
=  SharkEngineManager.getInstance().getSecurityManager();
        
if (sm  !=   null )
            
try
            
... {
                sm.check_executionadministration_get_sequence_processmgr(t, userId);
            }

            
//  Misplaced declaration of an exception variable
             catch (Exception ex)
            
... {
                
throw   new  BaseException(ex);
            }

        
return  SharkEngineManager.getInstance().getObjectFactory().createProcessMgrIteratorWrapper(t, userId).get_next_n_sequence(t, max_number);
        }
catch (Exception ex) ... {
        cus.info(
" ExecutionAdmin -> Unexpected error while user tries to get the list of process managers " );
        
throw   new  BaseException(ex);
       }

嵌套try-catch

你可能感兴趣的:(java,eclipse,Google)