Increasing the Heap Space
Hi,
I'm getting an exception stating that
"AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
Is there anyway like, to increase the Heap Space, so that OutOfMemoryError can be encountered.
How could I know like, what is the default heap space that is allotted?
Thanx in advance.
Message was edited by:
sarath44
[397 byte] By [
sarath44a] at [2007-11-27 11:08:16]

Firstly thnx for replying
When i typed at C:\>java -Xmx, I'm getting this error message
Invalid maximum heap size: -Xmx
Could not create the Java virtual machine.
I've even tried with C:\>java -Xms, I'm getting the same message that i got for -Xmx
Invalid initial heap size: -Xms
Could not create the Java virtual machine.
When i tried like, C:\>java -Xms256m it gave an error message stating
Error occurred during initialization of VM
Incompatible initial and maximum heap sizes specified
So I tried for, C:\>java -Xmx256m, then it gave a series of statements like
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-clientto select the "client" VM
-serverto select the "server" VM
-hotspotis a synonym for the "client" VM [deprecated]
The default VM is client.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-versionprint product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -helpprint this help message
-Xprint help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
Upon doing those things, I tried to execute my project, when I'm trying to execute my Project it is giving me an exception stating that
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space