I need to run a Java memory intensive application that uses more than 2GB, but I am having problems to increase the heap maximum size. So far, I have tried the following approaches:

我需要运行一个使用超过2GB的Java内存密集型应用程序,但是我在增加堆最大大小方面存在问题。到目前为止,我尝试了以下方法:

  • Setting the -Xmx parameter, e.g. -Xmx3000m. This approaches fails at the creation of the JVM. From what I've googled, it looks like that -Xmx must be less than 2GB.

    设置-Xmx参数,例如-Xmx3000m。这种方法在创建JVM时失败。从我用谷歌搜索的结果来看,-Xmx应该小于2GB。

  • Using the -XX:+AggressiveHeap option. When I try this approach I get an 'Not enough memory' error that tells that the heap size is 1273.4 MB, even though my computer has 8GB of memory.

    使用- xx:+ AggressiveHeap选项。当我尝试这种方法时,我得到一个“内存不足”的错误,提示堆大小为1273.4 MB,尽管我的计算机有8GB的内存。

Is there another approach that I can try to increase the maximum heap size of the JVM? Here's a summary of the computer specs:

是否有其他方法可以尝试增加JVM的最大堆大小?以下是电脑规格简介:

  • OS: Windows 7 (64 bit)
  • 操作系统:Windows 7(64位)
  • Processor: Intel Core i7 (2.66 GHz)
  • 处理器:英特尔酷睿i7 (2.66 GHz)
  • Memory: 8 GB
  • 8 GB内存:
  • java -version:
  • java - version:
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)

5 个解决方案

#1


43

Get yourself a 64-bit JVM from Oracle.

从Oracle获得一个64位JVM。

更多相关文章

  1. 如何在Apache POI(java)中读取.docx中的字体大小和字体名称
  2. 深入理解Java虚拟机读书笔记---垃圾回收与内存分配
  3. Java:在特定队列大小之后,以提交方式阻塞提交的ExecutorService。
  4. Java的Grizzly为缓冲区占用了大量内存?
  5. java基础---JVM---调优,垃圾收集器,内存分配策略
  6. java 画图注意 改变窗口大小不会消失
  7. java 中判断一个字符串中大小写字母的个数及其思路
  8. java使用compareTo实现一个类的对象之间比较大小
  9. (Java)出现/消失JPanel中的JLabel仅在调整大小时消失

随机推荐

  1. Android 进入Activity中默认不弹出软键盘
  2. [Android]Accessibility Service的知识点
  3. Android 如何获取手机内存大小,内置存储空
  4. Android layout_weight案例分析总结
  5. 控件 -- WebView -- Android与JS交互
  6. Android 更改TextView文字颜色(引用Drawab
  7. android实现回车键的监听
  8. Android常用设计模式
  9. Android 按键驱动
  10. 【Android】图片切换组件ImageSwitcher的