Results 1 to 3 of 3

Thread: JAVA REVERSE ENGINEERING: Decompiling and Recompiling Jar Files

  1. #1

    Default JAVA REVERSE ENGINEERING: Decompiling and Recompiling Jar Files

    TOOLS USED:

    1. DJ Java Decompiler- Program which decompiles jar or class files to source code in text format *.java. More info at site:
    Code:
    http://members.fortunecity.com/neshkov/dj.html
    2. JADMaker- Makes .jad file from .jar files
    Code:
    http://www.geocities.com/mangokun/jadmaker/jadmaker.htm
    3. Java SDK- Platform to develop Java Applications.
    Code:
    http://java.sun.com/j2se/1.4.2/download.html
    4. Sony Ericsson SDK 2.5.0 for the Java(TM) ME Platform (127 MB)- To recompile source codes to a jar file include an emulator.
    Code:
    http://developer.sonyericsson.com/getDocument.do?docId=96957
    You can see the files in a jar file with winrar. There are image files, manifest file class files etc. I f you want change the jar file read carefully.

    1. Step:
    With JADMaker make a .jad file from .jar file. Drag and drop the jar file over the JADMaker icon.

    2. Step:
    From Java ME SDK menu open WTK2>KToolbar. You can use different SDK'S or more professional tools like eclipse or Netbeans IDE's.

    From KToolbar File menu select Create Project from JAD/JAR File and select the .jad file created at first step.

    Now we have created the folders. Where?
    Inside C:\SonyEricsson\JavaME_SDK_CLDC\PC_Emulation\WTK2\ apps Folder.
    We can make without creating a project this work, too.

    3. Step:
    Open with 1. tool java decompiler the .jar file. Archiver shows all the files within jar archive file. Select all with mouse and click Decompile button. Select Folder to save the files. The file structure must be the same as in jar file. Answer the question asked yes. Now inside the folder there are some class files and some jad files. Don't change the folder structure. .jad dosyaları files are source codes of class files. Change the .jad extensions to .java. You can delete class files. Now copy this folder inside the apps folder mentioned at 2nd step.
    Now our project is ready. But icons and other files missing. Include them with opening the jar file with winrar. The folder structure must be the same.

    4. Step:
    We have source codes. So we can make changes. Some codes won't be decompiled. You can see some strange codes, but it is easy to guess the right code. Select Build from KToolbar menu. If we have made mistakes, the compiling will be aborted and errors will be shon under.
    If compiling succeeded, when we select Run command, the application will be opened in emulator. Some applications wont run in the emulator or on phone.

    5. Step
    Now it's time to make jar file. From KTollbar Project menu select Create Package.

    Inside the C:\SonyEricsson\JavaME_SDK_CLDC\PC_Emulation\WTK2\ apps folder of our project jar and jar files are ready inside the bin folder. You van use them now.

    If you use a program, buy the program. This tutorial is written to show the weakness of jar files and to help the programmers.

  2.    Advertissements


  3. #2

    Default

    this thing is really awesome dude., thanks for all the information

  4. #3

    Default

    Quote Originally Posted by engart View Post
    TOOLS USED:

    1. DJ Java Decompiler- Program which decompiles jar or class files to source code in text format *.java. More info at site:
    Code:
    http://members.fortunecity.com/neshkov/dj.html
    2. JADMaker- Makes .jad file from .jar files
    Code:
    http://www.geocities.com/mangokun/jadmaker/jadmaker.htm
    3. Java SDK- Platform to develop Java Applications.
    Code:
    http://java.sun.com/j2se/1.4.2/download.html
    4. Sony Ericsson SDK 2.5.0 for the Java(TM) ME Platform (127 MB)- To recompile source codes to a jar file include an emulator.
    Code:
    http://developer.sonyericsson.com/getDocument.do?docId=96957
    You can see the files in a jar file with winrar. There are image files, manifest file class files etc. I f you want change the jar file read carefully.

    1. Step:
    With JADMaker make a .jad file from .jar file. Drag and drop the jar file over the JADMaker icon.

    2. Step:
    From Java ME SDK menu open WTK2>KToolbar. You can use different SDK'S or more professional tools like eclipse or Netbeans IDE's.

    From KToolbar File menu select Create Project from JAD/JAR File and select the .jad file created at first step.

    Now we have created the folders. Where?
    Inside C:\SonyEricsson\JavaME_SDK_CLDC\PC_Emulation\WTK2\ apps Folder.
    We can make without creating a project this work, too.

    3. Step:
    Open with 1. tool java decompiler the .jar file. Archiver shows all the files within jar archive file. Select all with mouse and click Decompile button. Select Folder to save the files. The file structure must be the same as in jar file. Answer the question asked yes. Now inside the folder there are some class files and some jad files. Don't change the folder structure. .jad dosyaları files are source codes of class files. Change the .jad extensions to .java. You can delete class files. Now copy this folder inside the apps folder mentioned at 2nd step.
    Now our project is ready. But icons and other files missing. Include them with opening the jar file with winrar. The folder structure must be the same.

    4. Step:
    We have source codes. So we can make changes. Some codes won't be decompiled. You can see some strange codes, but it is easy to guess the right code. Select Build from KToolbar menu. If we have made mistakes, the compiling will be aborted and errors will be shon under.
    If compiling succeeded, when we select Run command, the application will be opened in emulator. Some applications wont run in the emulator or on phone.

    5. Step
    Now it's time to make jar file. From KTollbar Project menu select Create Package.

    Inside the C:\SonyEricsson\JavaME_SDK_CLDC\PC_Emulation\WTK2\ apps folder of our project jar and jar files are ready inside the bin folder. You van use them now.

    If you use a program, buy the program. This tutorial is written to show the weakness of jar files and to help the programmers.
    Is it possible to upgrade the java runtime environment on a device i.e. mobile phone, pda which uses SymbianTM as a operating platform.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219