🌐
Oracle
docs.oracle.com › javase › tutorial › essential › environment › cmdLineArgs.html
Command-Line Arguments (The Java™ Tutorials > Essential Java Classes > The Platform Environment)
The user enters command-line arguments when invoking the application and specifies them after the name of the class to be run. For example, suppose a Java application called Sort sorts lines in a file.
🌐
GeeksforGeeks
geeksforgeeks.org › java › command-line-arguments-in-java
Command Line Arguments in Java - GeeksforGeeks
Command-line arguments in Java are values passed to a program during execution through the command prompt.
Published: September 28, 2026
Discussions

Java Arguments(JVM), explaining them, and commonly used settings.
-d64 -server -XX:+AggressiveOpts -XX:+UnlockExperimentalVMOptions -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSConcurrentMTEnabled -XX:+ExplicitGCInvokesConcurrent -XX:ParallelGCThreads=4 -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+UseFastAccessorMethods -XX:+DisableExplicitGC -XX:MaxGCPauseMillis=10 -XX:GCPauseIntervalMillis=50 -XX:NewSize=84m -XX:+UseAdaptiveGCBoundary -XX:NewRatio=3 -Dfml.readTimeout=90 Boy it has been a while, anyway after a lot of testing this is my current setup, slightly modified to assume you have a 4 core cpu. While I still don't completely understand everything, I figured I should attempt to update this list. This setup has worked rather nicely for me and a few friends.Big notes include dropping -XX:G1NewSizePercent=20 and -XX:G1ReservePercent=20 as they are redundant if not using the G1 garbage collector. Instead I now use the -XX:+UseAdaptiveGCBoundary -XX:NewRatio=3 code, which will take 30% of your dedicated memory and automatically set that as the reserved percent for ALL garbage collectors. More on reddit.com
🌐 r/feedthebeast
26
68
July 30, 2019
Basic beginners in Java: what does 'arguments' mean in Java - Stack Overflow
iv'e been trying to learn basic java programming for the last 2 days, and I encountered an issue i can't figgure while viewing the following code: class DayCounter { public static void main(St... More on stackoverflow.com
🌐 stackoverflow.com
Difference between arguments and parameters in Java - Stack Overflow
Possible Duplicate: What's the difference between an argument and a parameter? I was going through some interview questions. I wasn't able to come up with a solid answer to this question: More on stackoverflow.com
🌐 stackoverflow.com
I am learning how to properly use Java parameters and arguments - Code Review Stack Exchange
I am learning to use parameters and arguments in Java to make my coding efficient. I am open to suggestion if I've done something wrong with this code of mine. import java.util.Scanner; public class More on codereview.stackexchange.com
🌐 codereview.stackexchange.com
July 10, 2020
🌐
W3Schools
w3schools.com › java › java_methods_param.asp
Java Method Parameters
Information can be passed to methods as a parameter. Parameters act as variables inside the method.
🌐
GeeksforGeeks
geeksforgeeks.org › java › argument-vs-parameter-in-java
Argument vs Parameter in Java - GeeksforGeeks
January 21, 2026 - Passed arguments replace the parameters defined in the function · The function executes using these passed values · Example: Java ·
🌐
Oracle
docs.oracle.com › javase › tutorial › java › javaOO › arguments.html
Passing Information to a Method or a Constructor (The Java™ Tutorials > Learning the Java Language > Classes and Objects)
Primitive arguments, such as an int or a double, are passed into methods by value. This means that any changes to the values of the parameters exist only within the scope of the method. When the method returns, the parameters are gone and any changes to them are lost.
🌐
Scientech Easy
scientecheasy.com › home › blog › arguments in java | parameters, example
Arguments in Java | Parameters, Example - Scientech Easy
June 1, 2026 - Arguments in Java are the actual values that are passed to variables defined in the method header when the method is called from another method.
🌐
Baeldung
baeldung.com › home › java › core java › command-line arguments in java
Command-Line Arguments in Java | Baeldung
September 16, 2026 - Since the main method is the entry point of a Java application, the JVM passes the command-line arguments through its arguments.
🌐
GoLinuxCloud
golinuxcloud.com › home › programming › java › java arguments explained [easy examples]
Java Arguments Explained [Easy Examples] | GoLinuxCloud
September 29, 2021 - As we already discussed Arguments in Java are the actual values that are passed to variables defined in the method header when the method is called from another method. That is, whenever any particular method is called during the execution of ...
Find elsewhere
🌐
CodingNomads
codingnomads.com › what-are-java-arguments-parameters
Method Parameters aka Arguments
Java arguments, or parameters, are the variables added to the method signature
🌐
Reddit
reddit.com › r/feedthebeast › java arguments(jvm), explaining them, and commonly used settings.
r/feedthebeast on Reddit: Java Arguments(JVM), explaining them, and commonly used settings.
July 30, 2019 -

Hello, I am a longtime player of modded minecraft and in my quest to fit as much stuff as I can into a modpack I ran into JVM arguments. After several days, and a headache later, this is what I have came up with so far. Do keep in mind, I have almost no java programming experience and this is compiled based off personal testing and various posts from people such as CPW Player and other programmers who know what they are doing far more than I do. They deserve the credit for this, I am merely trying to raise awareness for it and try to help some people who have issues running the game like my friends.Sources:

  • https://www.reddit.com/r/feedthebeast/comments/5jhuk9/modded_mc_and_memory_usage_a_history_with_a/

  • http://www.fasterj.com/articles/oraclecollectors1.shtml

  • https://www.reddit.com/r/feedthebeast/comments/beyi1t/the_ultimate_guide_to_improving_performance_in/

  • and several others however the first and second ones are the most relevant.

WARNING: THESE SETTINGS WILL NEED TO BE CHANGED BASED ON YOUR COMPUTER, EXPERIMENT AND FIND WHAT WORKS BEST FOR YOU, THIS IS JUST AN OUTLINE USING COMMONLY USED SETTINGS.

First off, the actual Garbage collector.What this does is free up unused memory periodically while java is running, aka cleans up the garbage.For minecraft, the two biggest ones are;-XX:+UseG1GC and -XX:+UseConcMarkSweepGCAs a note, -XX:+UseConcMarkSweepGC has many settings to it as outlined in the fasterj post.I found that -XX:+UseConcMarkSweepGC -XX:+UseParNewGC tends to work out best for me but this may differ.I am not sure if it is required, but I use -XX:+CMSConcurrentMTEnabled This way it makes sure multi-threading is enabled for the Garbage Collector, may not be required.

In tune with multi-threading, -XX:ParallelGCThreads=12 This command sets the number of parallel threads that the GC will use, this number is directly based on your processor. I have a 6 core intel processor and tend to not be doing anything when playing so I use all 12 of the available threads. Again this may vary so do some research on what processor you have and tweek accordingly.

Next up is this, -Dsun.rmi.dgc.server.gcInterval=2147483646To he honest, I actually do not know what exactly it means however the post by CPW explains it as follows "This tells the RMI layer not to do a full GC every minute."

-XX:+UnlockExperimentalVMOptions Does exactly what it says, it unlocks Experimental Java Virtual Machine Options.

-XX:+DisableExplicitGC As far as I can understand, some mods implement their own Garbage Collection in an effort to reduce memory usage which can sometimes interfere with the normal Garbage Collector, I believe that there is an alternative option but I can not remember it and will update this if I find it.

For the sake of finding a lot of options which I am not sure will work or not, and are most likely redundant or simply outdated, I will be skipping them. I have found that the simpler the arguments are, the more effective they tend to be, so here are the remaining args I know work.

And now for two important arguments for any Garbage Collector changes:

-XX:G1NewSizePercent=20 and -XX:G1ReservePercent=20 They "Tells G1GC to put aside 20% of the heap as "new" space. This is space where new objects will be allocated, in general."As a note, despite CPW saying G1GC they work with ALL Garbage Collectors as far as I can tell.This is especially useful in large modpacks where large amounts of blocks and items are present, again, tweek as necessary.

Much like the previous, -XX:MaxGCPauseMillis=50 is core to most of these arguments, and once again, works with ALL Garbage Collectors as far as I can tell. To again quote CPW "This tells G1GC to try and not stop for more than 50 milliseconds when garbage collecting, if possible. This is a target, and G1GC will ignore you if you put a silly number in like 1 which is unattainable. 50 millis is the time for one server tick "

Finally, there is -XX:G1HeapRegionSize=32M Which, I have no idea how to explain it myself, so here is CPWs Explanation " This tells G1GC to allocate it's garbage collection blocks in units of 32megs. The reason for this is that chunk data is typically just over 8megs in size, and if you leave it default (16 megs), it'll treat all the chunk data as "humungous" and so it'll have to be garbage collected specially as a result. Some mods cause humongous allocations as well, such as journeymap, and this setting helps them too."I have not played around with this one as the default settings make sense to me. Like the ones above it, it should work with ALL Garbage Collectors and not just G1GC.

And there you have it. My args come to look like this by the time all is said and done;-XX:+UseG1GC -XX:ParallelGCThreads=12 -XX:+DisableExplicitGC -Dsun.rmi.dgc.server.gcInterval=2147483646 -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=40 -XX:G1HeapRegionSize=32M

I am currently playing around with-XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSConcurrentMTEnabled -XX:ParallelGCThreads=12 -Dsun.rmi.dgc.server.gcInterval=2147483646 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M

You may have noticed that I did not include -Xmx or -Xms. These were not included because I use the MultiMc launcher and they do not work on other launchers either. For those who are not aware of what these two do, on the default minecraft launcher, they control the heap size. Or, better put, this is where you put the amount of ram to dedicate to minecraft. To quote CPW one last time "Minecraft eats a lot of memory. If you have -Xms set to something smaller, the garbage collector may be convinced to try "harder" to garbage collect to that lower target. This can result in "big lag spikes" because those aggressive collections will be slow and painful."

In the MultiMC launcher, Xms is Minimum memory allocated while Xmx is Maximum memory allocated.

In the twitch launcher, Xms can not be modified and Xmx is the memory slider under minecrafts settings

I am not familiar with other launchers as I have not used them in a long time but I will update when I find out about them.

So that wraps up all I was able to find on JVM arguments. One thing I discovered while creating this compilation is that the simpler the arguments, the more effective they seam to be. So I hope that his has helped all of you out there that are trying to optimize your minecraft just a little bit more.

Edit 1: As outlined in the comments, I recommend reserving at least one thread for your OS, one thread for background apps, and one thread for minecraft itself. So take your total threads and subtract at least 3 threads. Thanks to valarnin for pointing this mistake of mine out.

Edit 2:Testing reducing the thread count actually REDUCED my performance and caused slowdown across my PC. Though this is the case for me, you may get different results so play with the settings a bit.

Edit 3: Testing using -XX:+UseStringDeduplication Will report back with findings. Rough idea of this command is to remove redundant pieces of code that were used in a unoptimal way. I belive that I was using this during my original arguments before I went testing.

Top answer
1 of 5
4
-d64 -server -XX:+AggressiveOpts -XX:+UnlockExperimentalVMOptions -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSConcurrentMTEnabled -XX:+ExplicitGCInvokesConcurrent -XX:ParallelGCThreads=4 -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+UseFastAccessorMethods -XX:+DisableExplicitGC -XX:MaxGCPauseMillis=10 -XX:GCPauseIntervalMillis=50 -XX:NewSize=84m -XX:+UseAdaptiveGCBoundary -XX:NewRatio=3 -Dfml.readTimeout=90 Boy it has been a while, anyway after a lot of testing this is my current setup, slightly modified to assume you have a 4 core cpu. While I still don't completely understand everything, I figured I should attempt to update this list. This setup has worked rather nicely for me and a few friends.Big notes include dropping -XX:G1NewSizePercent=20 and -XX:G1ReservePercent=20 as they are redundant if not using the G1 garbage collector. Instead I now use the -XX:+UseAdaptiveGCBoundary -XX:NewRatio=3 code, which will take 30% of your dedicated memory and automatically set that as the reserved percent for ALL garbage collectors.
2 of 5
4
-XX:+DisableExplicitGC This particularly helps with dimension switching as there is a System.gc call in there. There is potential for Memory leaks and Java spitting out cryptic errors and such if you do use this (I do). -Xmx or -Xms Xms you can pretty much just leave away at this point. It's not needed. You can add Xmx to twitch arguments but be aware that you are overwriting the slider. Be careful not to use too much here. A bunch of optimization doesn't work properly if there is too much free space.
🌐
GoLinuxCloud
golinuxcloud.com › home › programming › java › java arguments vs parameters: a no-nonsense tutorial
Java Arguments vs Parameters: A No-Nonsense Tutorial | GoLinuxCloud
October 25, 2023 - Arguments are called theactual parameterwhereas parameters are calledformal parameters. Here is a comparison table: Java Arguments vs Parameters
🌐
Programiz
programiz.com › java-programming › command-line-arguments
Java Command-Line Arguments | Programiz
March 13, 2024 - Note: Arguments are always stored as strings and always separated by white-space. The main() method of every Java program only accepts string arguments.
🌐
Oracle
docs.oracle.com › en › java › javase › 17 › docs › specs › man › java.html
The java Command
April 21, 2026 - See Standard Options for Java. ... Only used to launch a single source-file program. Specifies the source file that contains the main class when using source-file mode. See Using Source-File Mode to Launch Single-File Source-Code Programs ... Optional: Arguments following mainclass, source-file, -jar jarfile, and -m or --module module/mainclass are passed as arguments to the main class.
🌐
Medium
medium.com › @AlexanderObregon › processing-command-line-arguments-in-java-applications-200ba9b7f029
Processing Command-Line Arguments in Java Applications
March 14, 2025 - When a Java program runs, it can accept command-line arguments that are passed directly from the terminal or command prompt. These arguments allow external input to be provided at runtime, making programs more flexible without requiring changes ...
🌐
DEV Community
dev.to › manoj_k_ › parameters-and-arguments-in-java-2ljn
Parameters and arguments in java - DEV Community
September 14, 2025 - Arguments are the actual values or data that you pass to a method when calling it.
🌐
yCrash
blog.ycrash.io › home › jvm arguments master sheet
JVM arguments master sheet - yCrash
January 31, 2023 - These arguments include settings for heap size, the […]