N
No Such Luck
Hi All:
I have a java applet that scans images using TWAIN. Depending on the
image options (dpi, color, etc), some combinations create a
java.lang.OutOfMemory heap error.
I am trying to set initial and max heap sizes by compiling the java
applet with ANT. I have read this is done by utilizing the -Xmx and
-Xms options in javac, and this is accomplished in ANT by using the
ANT_OPTS variable.
In ant.bat, I have tried specifying each of the following:
1) ANT_OPTS=
2) ANT_OPTS=-Xmx256m
3) ANT_OPTS=-Xmx128m
4) ANT_OPTS=-Xmx512m
5) ANT_OPTS=-Xms128m
6) ANT_OPTS=-Xms256m
7) ANT_OPTS=-Xms256m -Xmx256m
However, no matter what initial or max heap sizes I specify, the result
of printing Runtime.getRuntime().maxMemory() at any point in the java
applet is always "99942400" (or ~96 MB).
Anyone have any idea what I can do to actually increase the heap size
of my java applet? Or how I can get my heap size options of 256M to
actually be recognized and used?
Thanks.
I have a java applet that scans images using TWAIN. Depending on the
image options (dpi, color, etc), some combinations create a
java.lang.OutOfMemory heap error.
I am trying to set initial and max heap sizes by compiling the java
applet with ANT. I have read this is done by utilizing the -Xmx and
-Xms options in javac, and this is accomplished in ANT by using the
ANT_OPTS variable.
In ant.bat, I have tried specifying each of the following:
1) ANT_OPTS=
2) ANT_OPTS=-Xmx256m
3) ANT_OPTS=-Xmx128m
4) ANT_OPTS=-Xmx512m
5) ANT_OPTS=-Xms128m
6) ANT_OPTS=-Xms256m
7) ANT_OPTS=-Xms256m -Xmx256m
However, no matter what initial or max heap sizes I specify, the result
of printing Runtime.getRuntime().maxMemory() at any point in the java
applet is always "99942400" (or ~96 MB).
Anyone have any idea what I can do to actually increase the heap size
of my java applet? Or how I can get my heap size options of 256M to
actually be recognized and used?
Thanks.