Search code examples
javaandroidapkdex2jar

dex2jar is not recognized as an internal or external command, operable program or batch file


I am trying to convert one of my old APK's to a jar. 1. I downloaded apk tool in order to get the classes.dex file from my apk. 2. I downloaded dex2 jar and in the command line entered:

C:\Users\myLaptop\Downloads\dex2jar-2.0>dex2jar classes.dex

This lead to this Error:

dex2jar is not recognized as an internal or external command, operable program or batch file.

I am using a windows machine. I saw other questions posted on the issue on this site, when I tried them they didn't work. One solution was to use dex2jar version 0.0.9.15, but I got the same error when attempting to use that version.


Solution

  • I found the solution. If anyone is using dex2jar version 2.0 or higher, use this command in windows:

    C:\Users\Zookeeper\Downloads\dex2jar-2.0>d2j-dex2jar classes.dex dex2jar classes.dex ->.\classes-dex2jar.jar
    

    I now have a jar file from my apk