Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space #43

Closed
GoogleCodeExporter opened this issue Apr 7, 2015 · 14 comments

Comments

@GoogleCodeExporter
Copy link

Go below exception when I tries to dex2jar-0.0.7.8-SNAPSHOT/dex2jar.bat on apk 
file

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at pxb.android.dex2jar.optimize.c.CFrame.init(CFrame.java:111)
        at pxb.android.dex2jar.optimize.c.CFrame.<init>(CFrame.java:98)
        at pxb.android.dex2jar.optimize.c.CAnalyzer.newFrame(CAnalyzer.java:33)
        at pxb.android.dex2jar.optimize.c.Analyzer.merge(Analyzer.java:393)
        at pxb.android.dex2jar.optimize.c.Analyzer.analyze(Analyzer.java:264)
        at pxb.android.dex2jar.optimize.C.transform(C.java:45)
        at pxb.android.dex2jar.v3.V3MethodAdapter.visitEnd(V3MethodAdapter.java:
170)
        at pxb.android.dex2jar.reader.DexFileReader.visitMethod(DexFileReader.ja
va:504)
        at pxb.android.dex2jar.reader.DexFileReader.acceptClass(DexFileReader.ja
va:302)
        at pxb.android.dex2jar.reader.DexFileReader.accept(DexFileReader.java:17
7)
        at pxb.android.dex2jar.v3.Main.doData(Main.java:78)
        at pxb.android.dex2jar.v3.Main.doFile(Main.java:120)
        at pxb.android.dex2jar.v3.Main.main(Main.java:64)

Original issue reported on code.google.com by khanmurt...@gmail.com on 5 Feb 2011 at 11:51

@GoogleCodeExporter
Copy link
Author

What version of JDK are you using. I was having essentially the same problem. 
It turns out for me that Java could not find the package org.objectweb.asm when 
trying to import org.objectweb.asm.ClassVisitor and org.objectweb.asm.Opcodes.

The solution that worked for me was installing default-jdk (which in turn, 
installed openjdk-6-jdk for amd64). Previously I just had sun-java6-jdk 
installed.

I'm running Ubuntu 10.04.

Hope this helps.

Original comment by RandyFTo...@gmail.com on 9 Feb 2011 at 3:07

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

increasing JVM memory solved the problem.

Thank You

Original comment by khanmurt...@gmail.com on 9 Feb 2011 at 10:55

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Get this exception when i tried to increase the heap memory
C:\Users\Administrator\Desktop\project\androidtutorial\dex2jar-0.0.7.8-SNAPSHOT>
java -Xms512m -Xmx1024m -cp "%CLASSPATH%" pxb.android.dex2jar.v3.Main
%*
version:0.0.7.8-SNAPSHOT
4 [main] INFO pxb.android.dex2jar.v3.Main - dex2jar %* -> %*.dex2jar.jar
22 [main] WARN pxb.android.dex2jar.v3.Main - Exception while process file %*
java.io.FileNotFoundException: File '%*' does not exist
        at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:196)
        at org.apache.commons.io.FileUtils.readFileToByteArray(FileUtils.java:1359)
        at pxb.android.dex2jar.v3.Main.doFile(Main.java:111)
        at pxb.android.dex2jar.v3.Main.main(Main.java:64)
Done.

Original comment by krishnap...@gmail.com on 9 Mar 2011 at 7:20

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

when I try to open the dex2jar.bat in notepad looks like this

@echo off
set CLASSPATH=
FOR %%i IN ("%~dp0lib\*.jar") DO CALL "%~dp0setclasspath.bat" %%i

java -cp "%CLASSPATH%" pxb.android.dex2jar.v3.Main %*

where I have to modify in this file.

And, when I try to run in second one... get the error look like this

C:\Users\Administrator\Desktop\project\androidtutorial\dex2jar-0.0.7.8-SNAPSHOT>
java -Xms512m -Xmx1024m -cp "%CLASSPATH%" pxb.android.dex2jar.v3.Main
path/to/dexfile.dex
Exception in thread "main" java.lang.NoClassDefFoundError: 
pxb/android/dex2jar/v3/Main
Caused by: java.lang.ClassNotFoundException: pxb.android.dex2jar.v3.Main
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: pxb.android.dex2jar.v3.Main.  Program will exit.

Original comment by krishnap...@gmail.com on 10 Mar 2011 at 6:27

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

my problem was solved(increase heap memory)
thank u

Original comment by krishnap...@gmail.com on 11 Mar 2011 at 6:00

@GoogleCodeExporter
Copy link
Author

hi, i uses the dex2jar-0.0.7.9-SNAPSHOT. and tried the above methods, it still 
show:
java.lang.NoClassDefFoundError: pxb/android/dex2jar/v3/Main
Caused by: java.lang.ClassNotFoundException: pxb.android.dex2jar.v3.Main
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
Exception in thread "main" 

please help me!thanks!

Original comment by milli...@gmail.com on 15 Apr 2011 at 8:01

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Hi pxb1..

Im not getting your point....
How to fix the prob..."
java.lang.NoClassDefFoundError: pxb/android/dex2jar/v3/Main"

How to set a path without space?..
cud u plz explain it ?...
Thanks in advance..
Munna

Original comment by asksub...@gmail.com on 8 Sep 2011 at 10:18

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Thanks for your reply..
 Yes, I have chosen a (1) startdex2jar using dex2jar.sh..

Original comment by asksub...@gmail.com on 9 Sep 2011 at 9:04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant