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

查看:64
本文介绍了无效的初始堆大小-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 FAQ 适用于HotSpot JVM

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

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

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