Hi Dw.

I had java 8 installed I'm, the problem is that when I run a bat file that uses the java it says Invalid maximum heap size -Xmx4g. I've even tried to uninstall and reinstall java but the same problem persists.

I've added the Xms as well as Xmx in the environment property window but still the same issue, I've restarted the laptop after every attempt but still.

I've even set it on Java Control Panel as well but still the same issue is raised. Anyone who might know another location as to where is this 4g coming from because I don't recall setting that.

Recommended Answers

All 7 Replies

Is it in the .bat file?

I get this error when i try to execute the command line code for jadx.

Are you running a 64 bit JRE? 32 bit JREs won't support 4g of anything

"JADX" - is that the android de-compiler?
I'm looking at jadx.bat where I see:

set DEFAULT_JVM_OPTS="-Xms128M" "-Xmx4g" "-XX:+UseG1GC"
@rem Execute jadx
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %JADX_OPTS%  -classpath "%CLASSPATH%" jadx.cli.JadxCLI %*

Ow thanks James I will look at it tonight. I'm using 32bit.

Thanks it works.

Hello Mr. M.

I want to comment about 32 bit here. Over the past few months at the office we've been clearing the office of old gear and computers.

Along the way I found that old 32 bit based computers are definitely at a disadvantage since I didn't find current distros for Linux and ChromeOS.

Yes those laptops are about a decade old but the last time we did this, we loaded up either a Linux or ChromeOS if we didn't have a Windows for the machine then off it went to new owners.

-> It may be time to move on from 32 bit.

Thanks it works.

So what did you do- edit the .bat or upgrade to 64 bit?

ps: As a wise man once said as part of his DaniWeb signature: "Remember to mark your thread answered if your question has been answered."

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.