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:
- How to format strings in Java
- What exactly is Apache Camel?
- What is an instance variable in Java?
- How does the Java ‘for each’ loop work?
- How does the Java ‘for each’ loop work?
- What does “Could not find or load main class” mean?
- How do I create a file and write to it?
- When to use LinkedList over ArrayList in Java?
- How to convert a char to a String?
- How do you create a dictionary in Java? [closed]
- How do I declare and initialize an array in Java?
- Convert list to array in Java [duplicate]
- Convert String to double in Java
- How do I generate random integers within a specific range in Java?
- “Exception in thread “main” java.lang.IndexOutOfBoundsException: Index: 0, Size: 0″ with ArrayList?
- Raising a number to a power in Java
- Running JAR file on Windows 10
- Iterate through a HashMap [duplicate]
- Unfortunately MyApp has stopped. How can I solve this?
- exception in thread ‘main’ java.lang.NoClassDefFoundError:
- java.io.FileNotFoundException: the system cannot find the file specified
- How to parse this string in Java?
- How to match “any character” in regular expression?
- Double array initialization in Java
- I want to declare an empty array in java and then I want do update it but the code is not working
- Convert java.util.Date to String
- How do I do a deep copy of a 2d array in Java?
- Returning an empty array
- Java Security: Illegal key size or default parameters?
- Could not reserve enough space for object heap
- Eclipse: Java was started but returned error code=13
- Why java unknown: import org.apache.commons.codec.binary.Base64;?
- Extracting .jar file with command line
- Unable to create requested service [org.hibernate .engine.jdbc.env.spi.JdbcEnvironment]-MySQL
- Why do I get “Exception; must be caught or declared to be thrown” when I try to compile my Java code?
- Check jdk/JRE is installed and get path for jvm.dll
- What is Java String interning?
- Rename a file using Java
- JRE 1.7 – java version – returns: java/lang/NoClassDefFoundError: java/lang/Object
- Good Java graph algorithm library?
- Integrate Ant builder into Eclipse: Error “Variable references empty selection”
- Spring Maven clean error – The requested profile “pom.xml” could not be activated because it does not exist
- Java Class File Editor
- Error Importing SSL certificate : Not an X.509 Certificate
- How do I draw a triangle?
- warning: [options] bootstrap class path not set in conjunction with -source 1.5
- “Actual or formal argument lists differs in length”
- Static Block in Java
- What does Scanner input = new Scanner(System.in) actually mean?
- Class ‘Room’ is abstract; cannot be instantiated
- Creating a maze solving algorithm in Java
- IDEA: javac: source release 1.7 requires target release 1.7
- Can we write our own iterator in Java?
- local variables referenced from a lambda expression must be final or effectively final
- java.lang.IllegalMonitorStateException: object not locked by thread before wait()?
- WebServlet cannot be resolved to a type
- How do I print out the value of this boolean? (Java)
- How to add an object to an ArrayList in Java
- Getting warning “NDK is missing a ‘platforms” directory.’ with no NDK
- No appenders could be found for logger(log4j)?
- Why am i getting ” Duplicate modifier for the type Test” and how to fix it
- Picked up _JAVA_OPTIONS: -Xmx256M
- When to use static methods
- How to serialize an object into a string
- Getting the array length of a 2D array in Java
- Java String to SHA1
- How do I call one constructor from another in Java?
- Does Java have something like C#’s ref and out keywords?
- How to upload a file and JSON data in Postman?
- What is the difference between i++ & ++i in a for loop?
- when to throw FileNotFoundException
- How to use ArrayUtils for array of objects, it doesn’t delete the content of an array
- The ResourceConfig instance does not contain any root resource classes
- Which exception to throw for invalid input which is valid from client perspective
- Exception in thread “AWT-EventQueue-0”?
- Get Mouse Position
- Error: Could not find or load main class net.minecraft.launchwrapper.Launch when launching Minecraft 1.12.2 with Forge
- IllegalArgumentException: Bound must be positive
- Eclipse is executing the wrong Java file
- Understanding BufferedImage.getRGB output values
- What is the purpose of creating static object in Java?
- How to print a method in java
- build-impl.xml:1031: The module has not been deployed
- Spring-Security-Oauth2: Full authentication is required to access this resource
- Why is System.out.print() not working?
- setMnemonic() and call a method by pressing the key
- What is `AnyType` in java generics
- “insufficient memory for the Java Runtime Environment ” message in eclipse
- How to ping an IP address
- Java Not Greater than Or Equal to Operator for Char Type
- The request was rejected because no multipart boundary was found in springboot
- Maven dependency update on commandline
- The import javax.servlet can’t be resolved
- Java- The meaning of
>? - Where can I download the jar for org.apache.http package?
- Java – ‘ ) ‘ expected error
- What is the size of a boolean variable in Java?
- Use CSS in Java Applications
- java.lang.ArrayIndexOutOfBoundsException: 2 [duplicate]
- Fastest way to put contents of Set
to a single String with words separated by a whitespace?