i recieved this error after adding a lot of code in a lot of different classes and there seems to be tons of errors. does this really mean ive written too much code for one scenario, or is there something i can do about this? this is the explanation of the error that came up in the terminal window:
java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:75)
at java.awt.image.Raster.createPackedRaster(Raster.java:470)
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1032)
at java.awt.GraphicsConfiguration.createCompatibleImage(GraphicsConfiguration.java:186)
at greenfoot.util.GraphicsUtilities.toCompatibleTranslucentImage(GraphicsUtilities.java:285)
at greenfoot.util.GraphicsUtilities.loadCompatibleTranslucentImage(GraphicsUtilities.java:227)
at greenfoot.GreenfootImage.loadURL(GreenfootImage.java:260)
at greenfoot.GreenfootImage.loadFile(GreenfootImage.java:287)
at greenfoot.GreenfootImage.<init>(GreenfootImage.java:109)
at Asteroids.<init>(Asteroids.java:63)
at Rock1.<init>(Rock1.java:12)
at Space.addRocks(Space.java:36)
at Space.reset(Space.java:57)
at Space.<init>(Space.java:23)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at greenfoot.core.Simulation.newInstance(Simulation.java:520)
at greenfoot.platforms.ide.WorldHandlerDelegateIDE$3.run(WorldHandlerDelegateIDE.java:406)
at greenfoot.core.Simulation.runQueuedTasks(Simulation.java:411)
at greenfoot.core.Simulation.maybePause(Simulation.java:269)
at greenfoot.core.Simulation.runContent(Simulation.java:201)
at greenfoot.core.Simulation.run(Simulation.java:194)