Java的堆出太空错误 [英] Java Out Of Heap Space Error
本文介绍了Java的堆出太空错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我通过一个Ant脚本运行的一个非常漫长的过程,我让下面的堆,但它仍然给我的错误。
设置ANT_OPTS = -Xms1024m -Xmx2024M -XX:MaxPermSize参数= 512M
解决方案
我觉得奇怪,我说,你正在使用更多的2G执行版本(虽然它是完全可能的),所以我会做一些愚蠢的问题,只是帮你思考你的问题:
- 你真的确认ANT_OPTS设置是否正确?
- 您是否启动命令行或从IDE脚本?
- 您使用的是哪种操作系统?
- 多少物理内存已经在您的盒子有什么?
- 您使用的构建触发任何插件或工具?
- 您在构建期间发射试验?你在测试过程中分叉?
I'm running a very long process via an Ant script, I allowed the following heap but it still give me the error.
set ANT_OPTS=-Xms1024M -Xmx2024M -XX:MaxPermSize=512M
解决方案
It seems strange to me that you are using more 2G to perform a build (although it's clearly possible) so I'll make some silly questions just to help you thinking on your problem:
- Are you really sure that the ANT_OPTS is correctly set?
- Are you launching the script from command line or from an IDE?
- Which OS are you using?
- How much physical memory have you got in your box?
- Are you using any plugin or tool triggered by the build?
- Are you launching test during the build? Are you forking during tests?
这篇关于Java的堆出太空错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文