java.lang.OutofMemoryError


Thanks Dave & Curtis,

Using RealType.getRealType(..) instead of new RealType(..) worked. But now
I get another error. After 5 reads I get the following message:

java.lang.OutOfMemoryError
        at visad.Linear1DSet.indexToValue(Linear1DSet.java, Compiled Code)
        at visad.Linear2DSet.indexToValue(Linear2DSet.java, Compiled Code)
        at visad.Linear2DSet.getSamples(Linear2DSet.java, Compiled Code)
        at TerrainView.<init>(TerrainView.java, Compiled Code)
        at OmegaWindowManager.actionPerformed(OmegaWindowManager.java,
Compiled Code)
        at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java,
Compiled Code)
        at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java,
Compiled Code)
        at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java,
Compiled Code)
        at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java,
Compiled Code)
        at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java,
Compiled Code)
        at java.awt.Component.processMouseEvent(Component.java, Compiled
Code)
        at java.awt.Component.processEvent(Component.java, Compiled Code)
        at java.awt.Container.processEvent(Container.java, Compiled Code)
        at java.awt.Component.dispatchEventImpl(Component.java, Compiled
Code)
        at java.awt.Container.dispatchEventImpl(Container.java, Compiled
Code)
        at java.awt.Component.dispatchEvent(Component.java, Compiled Code)
        at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java, Compiled
Code)
        at
java.awt.LightweightDispatcher.processMouseEvent(Container.java, Compiled
Code)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java,
Compiled Code)
        at java.awt.Container.dispatchEventImpl(Container.java, Compiled
Code)
        at java.awt.Window.dispatchEventImpl(Window.java, Compiled Code)
        at java.awt.Component.dispatchEvent(Component.java, Compiled Code)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java, Compiled
Code)
        at
java.awt.EventDispatchThread.pumpOneEventForComponent(EventDispatchThread.java,
Compiled Code)
        at
java.awt.EventDispatchThread.pumpEventsForComponent(EventDispatchThread.java,
Compiled Code)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java, Compiled
Code)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java,
Compiled Code)
 
I had increased the array size to 600x600 which is the dimension of
the actual DTED datafile. When I reduced the dimension size back to a
small number, it seems to work alright. Any help would be
appreciated.


Thanks,

Nash'at