Invalid maximum heap size

I copied the jdk directory from somewhere else. Since then, I have been getting the following error message.

Your environment has been set.
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) Client VM (build 1.5.0_22-b03, mixed mode, sharing)
PROPS=-Xms1024m -Xmx5096m -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -Djava.ext.dirs=..;.;..\lib;..\classes -Dfile.encoding=UTF-8
CLASSPATH=C:\Oracle\MIDDLE~1\patch_wls1211\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\JDK15~1.0_2\lib\tools.jar;C:\Oracle\MIDDLE~1\WLSERV~1.1\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~1\WLSERV~1.1\server\lib\weblogic.jar;C:\Oracle\MIDDLE~1\modules\features\weblogic.server.modules_12.1.1.0.jar;C:\Oracle\MIDDLE~1\WLSERV~1.1\server\lib\webservices.jar;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;C:\Oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;
Invalid maximum heap size: -Xmx5096m
The specified size exceeds the maximum representable size.
Could not create the Java virtual machine.

      

Does this mean I will have to reinstall jdk and not just copy over any installation directory? I ask for this and have not tried it myself because this exercise should be done on the client machine.

The current computer is a Windows 2008 server and has 12 GB of RAM.

+7


source to share


3 answers


You are using a 32-bit VM (Java HotSpot (TM) Client VM) which can be mapped up to a maximum of 4G (only 2 GB in fact) 2 ^ 32 addresses Maximum Java heap size 32-bit JVM on 64-bit OS

The error message suggests you are using 5 GB heap memory which is not supported on 32-bit architecture

Invalid maximum heap size: -Xmx5096m The specified size exceeds the maximum displayed size.



Failed to create Java virtual machine.

You can change the -Xmx parameter to use anythinng <= 2g here.

+7


source


I just ran into a problem and solved it by downloading 64bit JAVA windows .



Make sure your Windows version is 32-bit or 64-bit and download the correct JAVA version.

+1


source


Thanks for the help Lizzy, I had to reinstall windows and forget about it

0


source







All Articles