View previous topic :: View next topic |
Author |
Message |
deltamalloc Apprentice
Joined: 18 Jan 2013 Posts: 279
|
Posted: Sat Oct 01, 2016 11:14 pm Post subject: How to execute a java program (dex2jar)? |
|
|
I have cloned the git repo for the dex2jar utility: https://github.com/pxb1988/dex2jar
I have built it successfully, but I'm unable to execute it.
Running the d2j-dex2jar.sh file gives me:
Code: |
$ ./d2j-dex2jar.sh
Error: Could not find or load main class com.googlecode.dex2jar.tools.Dex2jarCmd
|
I then tried to change to the folder dex2jar/dex-tools/build/classes/main and type:
Code: |
$ java com.googlecode.dex2jar.tools.Dex2jarCmd
Exception in thread "main" java.lang.NoClassDefFoundError: com/googlecode/dex2jar/tools/BaseCmd
|
However, this doesn't work either.
What is the correct way to run this utility?
I'm using oracle-jdk-bin-1.7:
Code: |
$ java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
$ javac -version
javac 1.7.0_80
|
|
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30917 Location: here
|
Posted: Sun Oct 02, 2016 8:13 am Post subject: |
|
|
The command return the error because has not found jar libs. I downloaded version 2.0 and the content is:
Code: | $ ls
d2j-baksmali.sh d2j-dex2jar.sh d2j-jar2dex.sh d2j-jasmin2jar.sh d2j-std-apk.sh lib
d2j-dex-recompute-checksum.sh d2j-dex2smali.sh d2j-jar2jasmin.sh d2j-smali.sh d2j_invoke.sh
$ ls lib/
antlr-runtime-3.5.jar d2j-base-cmd-2.0.jar d2j-smali-2.0.jar dex-reader-2.0.jar dex-tools-2.0.jar dex-writer-2.0.jar
asm-debug-all-4.1.jar d2j-jasmin-2.0.jar dex-ir-2.0.jar dex-reader-api-2.0.jar dex-translator-2.0.jar dx-1.7.jar |
When I run command work but if I rename lib in lib1 command return same error. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
|