views:

58

answers:

0

Possible Duplicate:
“undecompilable” source code in java

You can make code undecompilable, the cuestion is how?

I have a fragment of code in java microedition that is undecompilable by jd:


public static void main(String args[]) {
    int s = getSize("",false);
    System.out.println(s);
}

public static int getSize(String recordStore, boolean available) {
        RecordStore rs = null;
        int size = -1;
        try {
            rs = RecordStore.openRecordStore(recordStore, true);
            size = available ? rs.getSizeAvailable() : rs.getSize();
        } catch (Exception ex) {
        } finally {
            if (rs != null) {
                try {
                    rs.closeRecordStore();
                } catch (RecordStoreNotOpenException ex) {
                } catch (RecordStoreException ex) {
                }
            }
        }
        return size;
    }

Another example? Try to decompile opera mini source code, inside it there is a fragment of code that you can't decompile (here is hidden the proxy server of opera mini)

Do you know what are the rules to make code undecompilable in order to avoid reverse engineering on java code?

Thanks for read me