see here: Java Tool Doc, it says,
-Xmxn
Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. The upper limit for this value will be approximately 4000m on Solaris 7 and Solaris 8 SPARC platforms and 2000m on Solaris 2.6 and x86 platforms, minus overhead amounts. Examples:
-Xmx83886080 -Xmx81920k -Xmx80m
So, in simple words, you are setting Java heap memory to a maximum of 1024 MB from the available memory, not more.
Notice there is NO SPACE between -Xmx and 1024m
It does not matter if you use uppercase or lowercase. For example: “-Xmx10G” and “-Xmx10g” do the exact same thing.
Related Posts:
- Can’t execute jar- file: “no main manifest attribute”
- In a simple to understand explanation, what is Runnable in Java?
- Java – How to use \t in my example [duplicate]
- Android Studio Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
- String concatenation: concat() vs “+” operator
- How to remove the last character from a string?
- Java : Comparable vs Comparator [duplicate]
- Convert int to char in java
- Change date format in a Java string
- Global variables in Java
- How to request.getParameterNames into List of strings?
- How can I prevent java.lang.NumberFormatException: For input string: “N/A”?
- Compiled vs. Interpreted Languages
- How to round up to the next integer?
- Spring @PropertySources value not overriding
- How to send Https Post request in java
- What is the purpose of a listener in Java?
- stale element reference: element is not attached to the page document
- Error: can only iterate over an array or an instance of java.lang.Iterable
- Why can array constants only be used in initializers?
- Where is Java’s Array indexOf?
- How to check if an int is a null
- How do I apply the for-each loop to every character in a String?
- Session TimeOut in web.xml
- Java – removing first character of a string
- How to send a Map in JSON
- What is the significance of log4j.rootLogger property in log4j.properties file? What happens if I don’t use this property?
- “Instantiating” a List in Java? [duplicate]
- HTTP Status 405 – Request method ‘POST’ not supported (Spring MVC)
- Missing `server’ JVM (Java\jre7\bin\server\jvm.dll.)
- Convert String array to ArrayList
- java uses or overrides a deprecated API error
- What is setBounds and how do I use it?
- Exception in thread “main” java.lang.NumberFormatException: For input string: “S”
- Java Console Prompt for ENTER input before moving on [duplicate]
- Maven: Failed to read artifact descriptor
- The system cannot find the file specified in java
- Java Generate Random Number Between Two Given Values
- How to set JAVA_HOME environment variable on Mac OS X 10.9?
- Remove last character of a StringBuilder?
- Why SpringMVC Request method ‘GET’ not supported?
- Error: JAVA_HOME is not defined correctly executing maven
- Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory
- Android – SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
- How to sort an array of objects in Java?
- Filling a 2D array in Java
- How to compress a String in Java?
- The specified child already has a parent. You must call removeView() on the child’s parent first (Android)
- HTTP Status 500 Error instantiating servlet class
- How to convert the following json string to java object?
- Java end of file
- A KeyValuePair in Java
- Unclosed Character Literal error
- Java error: void cannot be converted to String
- CreateProcess error=2, The system cannot find the file specified
- Add String Array to ArrayList
- Java Array Sort descending?
- The import javafx cannot be resolved
- Java Copy Constructor ArrayLists
- Implementing an actionlistener to a JTextField
- StringIndexOutOfBoundsException String index out of range: 0
- Cannot resolve method in java
- How to Set JPanel’s Width and Height?
- Address already in use: JVM_Bind java
- java.lang.ClassNotFoundException:com.mysql.jdbc.Driver [duplicate]
- How can I check if a value is of type Integer?
- Using regex to match any character except =
- Why is a ConcurrentModificationException thrown and how to debug it
- How to sort a HashSet?
- Variable used in lambda expression should be final or effectively final
- Populate int array with for loop in Java
- calling boolean method, heads or tails
- Android Color Picker
- How to fix an UnsatisfiedLinkError (Can’t find dependent libraries) in a JNI project
- How to Delete a topic in apache kafka [duplicate]
- Java Main Game Loop
- “Integer number too large” error message for 600851475143
- How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version
- JPA or JDBC, how are they different?
- Why is Netbeans suggesting I “Flip operands of the binary operators” in my Java code
- How to return nothing from a function that returns value?
- Java simple code: java.net.SocketException: Unexpected end of file from server
- Append a single character to a string or char array in java?
- Java printf formatting to print items in a table or columns
- How to resolve “Syntax error on token “else”” in Java?
- What’s the difference between Jetty and Netty?
- Is there a way to simulate the C++ ‘friend’ concept in Java?
- Good way to encapsulate Integer.parseInt()
- What is the difference between “Double” and “double” in Java?
- What is the purpose of the default keyword in Java?
- What exactly is Ajax request? Is it different from Servlet Request?
- java ‘jar’ is not recognized as an internal or external command
- A JRE or JDK must be available in order to run Eclipse. No JVM was found after searching the following locations
- Why cannot cast Integer to String in java?
- java.util.ConcurrentModificationException with iterator
- How to read file from relative path in Java project? java.io.File cannot find the path specified
- String cannot be resolved to a type – Java RAD
- IntelliJ IDEA “The selected directory is not a valid home for JDK”
- Simple timeout in java
- Eclipse message saying List cannot be resolved to a type