javaandroidjardexdex2jar

Convert .dex file to .jar file using dex2jar


I have made an application that converts .dex file to .jar file using the library dex2jar. the code is given as follows:

import com.googlecode.dex2jar.v3.Main;
{
    String apkPath = "D://myapk.apk" ;
    Main.main(apkPath);
}

this code block works properly and I am getting asd_dex2jar.jar file, but the problem is after executing calling the main(), the program closes automatically,

so is there any way to do this any another way ??


Solution

  • Check the documentation or the source code: https://code.google.com/p/dex2jar/source/browse/dex-translator/src/main/java/com/googlecode/dex2jar/v3/Main.java

    Maybe you could just call its public static void doFile(File srcDex) method.