java.lang.OutOfMemoryError

I am getting this error. I know very little about java

java.lang.OutOfMemoryError

at org.apache.tools.ant.Project.executeTarget(Project.java:1224)

at org.apache.tools.ant.Project.executeTargets(Project.java:1063)

at org.apache.tools.ant.Main.runBuild(Main.java:632)

at org.apache.tools.ant.Main.startAnt(Main.java:183)

at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)

at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)

Caused by: java.lang.OutOfMemoryError

Nested Exception

java.lang.OutOfMemoryError

[595 byte] By [Flashback35a] at [2007-10-2 22:30:25]
# 1
Try to increase memory heap size, start java with additional parameters: -Xmx256m -Xms256m. Or 512m, or 1024m or ... anything.
Michael.Nazarov@sun.coma at 2007-7-14 1:47:59 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
Can I set this at the command prompt? How do I know what the default is currently set to?I know almost nothing about java. Thanks for any help on this.
Flashback35a at 2007-7-14 1:47:59 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 3
Yes, these are options for command line.
Michael.Nazarov@sun.coma at 2007-7-14 1:47:59 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 4
Is this correct syntax?java -Xmx256m
Flashback35a at 2007-7-14 1:47:59 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 5
Why don't you try?Yes this is correct.
Michael.Nazarov@sun.coma at 2007-7-14 1:47:59 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 6

I did try. This is the result:

[prod77@structor01 prod77]$ java -Xmx256m

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

-showversion print product version and continue

-? -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

[prod77@structor01 prod77]$

Flashback35a at 2007-7-14 1:47:59 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 7
:))You should run java as usual ADDING specified parameter(s).java -Xmx256m MySuparMeggaClass
Michael.Nazarov@sun.coma at 2007-7-14 1:47:59 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...