Exception occurred during event dispatching:
java.lang.OutOfMemoryError: Java heap space
at Utility.Matrix.<init>(Matrix.java:22)
at Utility.Matrix.times(Matrix.java:402)
at Utility.Matrix.vectorMultiplyMatrix(Matrix.java:224)
at LatentSemanticAnalysis.Models.modelTraining(Models.java:92)
at DesktopInterface.Setting.jButton4ActionPerformed(Setting.java:397)
at DesktopInterface.Setting.access$3(Setting.java:391)
at DesktopInterface.Setting$4.actionPerformed(Setting.java:108)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$3.run(Unknown Source)
是程序运算量太大,内存不够用吗?用另外一组数据时,可以通过。换了一组量相对比较大的数据,就出现上面的错误了。求达人指点。
java.lang.OutOfMemoryError: Java heap space
at Utility.Matrix.<init>(Matrix.java:22)
at Utility.Matrix.times(Matrix.java:402)
at Utility.Matrix.vectorMultiplyMatrix(Matrix.java:224)
at LatentSemanticAnalysis.Models.modelTraining(Models.java:92)
at DesktopInterface.Setting.jButton4ActionPerformed(Setting.java:397)
at DesktopInterface.Setting.access$3(Setting.java:391)
at DesktopInterface.Setting$4.actionPerformed(Setting.java:108)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$3.run(Unknown Source)
是程序运算量太大,内存不够用吗?用另外一组数据时,可以通过。换了一组量相对比较大的数据,就出现上面的错误了。求达人指点。
在命令行中,启动参数中增加 -Xmx1024m 就是分配1G了。
关于JVM内存参数,网上有非常非常非常非常多的资料
256m
-vmargs
-Xverify:none
-Xms40m
-Xmx256m???