Exception in thread “main” java.lang.OutOfMemoryError: Java heap space

I have written a code and I run it a lot but suddenly I got an OutOfMemoryError:

  Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at javax.media.j3d.BoundingBox.<init>(BoundingBox.java:86)
        at javax.media.j3d.NodeRetained.<init>(NodeRetained.java:198)
        at javax.media.j3d.LeafRetained.<init>(LeafRetained.java:40)
        at javax.media.j3d.LightRetained.<init>(LightRetained.java:44)
        at javax.media.j3d.DirectionalLightRetained.<init>(DirectionalLightRetained.java:50)
        at javax.media.j3d.DirectionalLight.createRetained(DirectionalLight.java:116)
        at javax.media.j3d.SceneGraphObject.<init>(SceneGraphObject.java:119)
        at javax.media.j3d.Node.<init>(Node.java:178)
        at javax.media.j3d.Leaf.<init>(Leaf.java:50)
        at javax.media.j3d.Light.<init>(Light.java:270)
        at javax.media.j3d.DirectionalLight.<init>(DirectionalLight.java:87)

Leave a Comment

error code: 523