The L3rNa3aN
The L3rNa3aN

Reputation: 11

Picked up _JAVA_OPTIONS. Invalid max heap size?

So, I was trying to run my test Minecraft mod in Prompt as per a tutorial. In one part, I should type in 'gradlew getIntellijRuns' and everything should run smoothly. Instead, this message appears: -

I've even tried "Xmx4096m", but it generates the same message.

Invalid maximum heap size: -Xmx4G
The specified size exceeds the maximum representable size.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Upvotes: 0

Views: 1836

Answers (1)

The L3rNa3aN
The L3rNa3aN

Reputation: 11

Okay. I solved the issue! So, I had allotted a bit too much RAM for _JAVA_OPTIONS. I tried '-Xmx1024m' and it worked brilliantly. And also, I made a small mistake in compiling the Gradle project via Command Prompt.

This is what I had typed: - gradlew getIntellijRuns

And what I was supposed to type: - gradlew genIntellijRuns

I found this out when I typed this: - gradlew tasks

This command lists all available commands for the project. That way, I rectified my mistake.

Upvotes: 1

Related Questions