| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1414 人关注过本帖
标题:java 陣列問題
取消只看楼主 加入收藏
loyusum
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2017-4-29
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:0 
java 陣列問題
有一天我打算寫一個加密的程式。
本來好好的,可以正常使用
但我拿去加密一個1.07GB的檔案時就出事了
執行時顯示:
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    at try2$SampleActionListener.actionPerformed(try2.java:131)
    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.(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.(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.(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$500(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

查看後發現[byte inb = new byte[1150961924];]這句出了問題
如何解決 ?
搜索更多相关主题的帖子: 加密 Java java thread 
2017-04-29 11:30
快速回复:java 陣列問題
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019476 second(s), 11 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved