JAVA invalid maximum heap size. The specified size exceeds the maximum representable size

I have to run this command to fix the code to a xml file:

java -Xmx5G -cp .:jsoup-1.8.2.jar CheckSyntax test.xml > test2.xml

But it gives me this error:

Invalid maximum heap size: -Xmx5G
The specified size exceeds the maximum representable size.

How can I make it work?

Leave a Comment