无效的初始堆大小 -Xms4096M [英] Invalid initial heap size -Xms4096M

查看:74
本文介绍了无效的初始堆大小 -Xms4096M的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的计算机上运行 Cassandra,但我不断收到以下错误消息:

I'm trying to run Cassandra on my computer, but I keep getting the following error message:

Invalid initial heap size: -Xms4096M
The specified size exceeds the maximum representable size.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

有人知道为什么以及如何解决这个问题吗?

Anyone know why and how to fix this?

我正在跑步:

Windows 10 Pro 64bit
Java 32 Bit

看来我需要安装 64 位版本的 JRE.我已经尝试为此搜索 java.com 和 oracle.com,但我找不到任何明显的东西可以让我安装 64 位 JRE.java.com 的默认安装程序似乎是 32 位.有人可以告诉我如何以及从哪里获得 64 位 JRE 吗?

It seems I need to install a 64bit version of JRE. I have tried searching java.com and oracle.com for this, but I can't find anything obvious which will let me install a 64bit JRE. The default installer from java.com seems to be 32bit. Can someone please let me know how and where to get the 64bit JRE from?

推荐答案

由于 JVM 需要比堆更多的空间,如交换空间和 VM 开销,因此 32Bit JVM 中的最大堆空间应低于 4GB.

Since the JVM needs more space than just the heap like swap space and VM overhead, the maximum heapspace in a 32Bit JVM should be lower than 4GB.

  • 您可以尝试将最大堆空间设置为 2GB:-Xmx2048M
  • 或者,您可以只安装 64 位 JVM.

有关详细信息,请查看 Oracle 常见问题解答用于 HotSpot JVM

For more information, check out the Oracle FAQ for the HotSpot JVM

这篇关于无效的初始堆大小 -Xms4096M的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆