Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to execute a java program (dex2jar)?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
deltamalloc
Apprentice
Apprentice


Joined: 18 Jan 2013
Posts: 279

PostPosted: Sat Oct 01, 2016 11:14 pm    Post subject: How to execute a java program (dex2jar)? Reply with quote

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
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30917
Location: here

PostPosted: Sun Oct 02, 2016 8:13 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum