Yang's Lab > Software > NMRspy

Interface Overview | Control Panel | Spectral Display Windows | Spectral Attribute Windows | Other Dialogs & Windows

Out Of Memory Exception

The Java Virtual Machine (JVM) is the execution component of the Java Runtime Environment (JRE) that interprets and executes the byte code stored in a Java class. Within the Java Virtual Machine is a notional idea of the Java heap which is where objects created in a Java class reside in memory during the program's execution.

Please use "NMRspy Control Panel -> Tools -> Detect Java Heap Size" to detect the Java's default heap size limit of your system. If NMRspy requires an extensive use of memory and you do not increase the default Java Heap size, then NMRspy can fail on an "out of memory" Java exception.

NMRspy users usually encounter this problem when peak-picking a crowded 3D/4D spectrum or loading a large dataset. Each peak occupies 512 bytes of memory space (2048 peaks = 1MB, 2 million peaks = 100MB). You may higher the level of a spectrum before peak-picking, delete unused dataset from current project or increase the java heap size.

Two JVM options are often used to tune JVM heap size: -Xmx for maximum heap size, and -Xms for initial heap size. If you need more heap size, you should use command line like “java –Xms128m –Xmx1024m -jar NMRspy.jar” to launch NMRspy. Click here to learn how to run NMRspy.jar using command line.