I am trying to run some .jar file but I am getting below error. The system has 20 gb of ram and my Xms and Xmx values are -Xms2048m -Xmx4096m
Are these values are too big or there is another thing causing this error?
java.lang.OutOfMemoryError: Java heap space
EDIT:
java -jar -Xms2048m -Xmx4096m /Filereadertest.jar
I am using java 1.7.51
Java HotSpot(TM) 64-Bit Server VM
java -version?java -versionwould tell us this.