5

I am running an grails application for my project in IntelliJ and I have set the vm options to :

-Dserver.port=8080 -Xms3g -Xmx3g -XX:-UseGCOverheadLimit -Xverify:none

The logs are :

Running Grails application

Invalid maximum heap size: -Xmx4096M

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.

Error | Forked Grails VM exited with error

Please help me with that ?

1
  • How much RAM you have available? What operating system do you use? Which JDK have you installed? Commented Jun 16, 2020 at 3:45

1 Answer 1

7

If your JVM is 32bit, then heap size should be lower than 4gb. Either you can install 64bit JVM, or set the maximum heapspace to 2GB with -Xmx2048M. I had similar problem and this worked for me, hope this helps you as well.

Sign up to request clarification or add additional context in comments.

7 Comments

i have jdk installed amd-64 does it includes jvm ?
please run "java -version" in command line to see whether jvm 32 or 64. And yes jdk contains everything that is in the jre, because jdk is superset of jre
I have ubuntu installed it is not showing whether jdk is 32 bit or 64 bit. Please help.
Please tell me what you see on the third line when you open your terminal and run the following command: java -version. you should be seeing OpenJDK 32 or 64 -Bit
Java HotSpot(TM) Server VM (build 25.25-b02, mixed mode) This is written in 3 line.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.