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?
64 bit JVM installed on Solaris machines runs with a 32-bit model if you don't specify either -d32 or -d64, which won't accept a Maximum heap size of 4GB, hence "invalid heap size". You can resolve this issue by running Solaris JVM with option -d64.
The approximate Maximum heap size for a 32-bit JVM on a 64-bit Operating system can be 3.7GB.
For 64 bit platforms and Java stacks in general, the recommended Maximum Heap range for WebSphere Application Server, would be between (4096M - 8192M) or (4G - 8G).
If your JVM is 32-bit you cannot use the switch -d64
java -Xmx2G -cp .:jsoup-1.8.2.jar CheckSyntax test.xml > test2.xml
32 bit java cant use heapsize > 2G
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With