“Error occurred during initialization of VM; Could not reserve enough space for object heap” using -Xmx3G

First of all, I have a box with 8gb of ram, so I doubt total memory is the issue. This application is running fine on machines with 6gb or less. I am trying to reserve 3GB of space using -Xmx3G under “VM Arguments” in Run Configurations in Eclipse. Every time I try to reserve more … Read more

What does -XX:MaxPermSize do?

The permanent space is where the classes, methods, internalized strings, and similar objects used by the VM are stored and never deallocated (hence the name). This Oracle article succinctly presents the working and parameterization of the HotSpot GC and advises you to augment this space if you load many classes (this is typically the case for … Read more

JVM Crash – “EXCEPTION_ACCESS_VIOLATION”

The crash happens inside DirectX library: d3d9.dll. Try the following options: Update / reinstall graphics driver. Switch off graphics card utilities (I’ve noticed RivaTuner in the list of loaded libraries). Run Java with -Dsun.java2d.d3d=false JVM option or set J2D_D3D=false environment variable. This would definitely help, though Java will not make use of Direct3D acceleration.

Missing `server’ JVM (Java\jre7\bin\server\jvm.dll.)

To Fix The “Missing “server” JVM at C:\Program Files\Java\jre7\bin\server\jvm­­.dll, please install or use the JRE or JDK that contains these missing components. Follow these steps: Go to oracle.com and install Java JRE7 (Check if Java 6 is not installed already) After that, go to C:/Program files/java/jre7/bin Here, create an folder called Server Now go into the C:/Program files/java/jre7/bin/client folder Copy all … Read more

How do I set the proxy to be used by the JVM

From the Java documentation (not the javadoc API): http://download.oracle.com/javase/6/docs/technotes/guides/net/proxies.html Set the JVM flags http.proxyHost and http.proxyPort when starting your JVM on the command line. This is usually done in a shell script (in Unix) or bat file (in Windows). Here’s the example with the Unix shell script: JAVA_FLAGS=-Dhttp.proxyHost=10.0.0.100 -Dhttp.proxyPort=8800 java ${JAVA_FLAGS} … When using containers such as JBoss or WebLogic, … Read more

How do I use the JAVA_OPTS environment variable?

JAVA_OPTS is the standard environment variable that some servers and other java apps append to the call that executes the java command. For example in tomcat if you define JAVA_OPTS=’-Xmx1024m’, the startup script will execute java org.apache.tomcat.Servert -Xmx1024m If you are running in Linux/OSX, you can set the JAVA_OPTS, right before you call the startup script by doing JAVA_OPTS=’-Djava.awt.headless=true’ This … Read more

wrong ELF class: ELFCLASS32

Based on the conversation in the other answer, it was inferred that the JVM was a 64-bit process. This was confirmed using the pflags command in Solaris. Apparently the -d32 flag passed to the JVM was being ignored. This was due to the possibility of the JVM being a 64-bit one, which was incapable of operating in the 32-bit mode. … Read more