Skip to content

How to Define Java Parameters

Jeffrey Gilliam edited this page Aug 15, 2017 · 5 revisions

From time to time, it may be necessary to change the default Java parameters that SIMRacingApps uses. So here is how to do that. When you download the server, it usually comes with the version in the name of the .exe file. For example:

SIMRacingAppsServer_1.0_Build_2016.07.07.exe or SIMRacingAppsServer_1.2_Build_BETA-2017.03.18.exe

NOTE: If you cannot see the .exe extension, then you need to enable that in the windows file mananger under the view menu and select File name Extensions.

To change or add a Java parameter, create a file with the same name, but a different extension, in the same folder as the .exe file. The new extension is ".l4j.ini". For example:

SIMRacingAppsServer_1.0_Build_2016.07.07.l4j.ini or SIMRacingAppsServer_1.2_Build_BETA-2017.03.18.l4j.ini

Now you can edit this file and place the Java Parameters in the file, one per line. For example here are the memory defaults.



Other parameters you might find useful are:


To see all the possible parameters, go to a CMD window and type "java -?" and "java -X". It is beyond the scope of this article to explain what they all mean. But I will update this page, if I find any of them help SRA specifically, and how to use them.

It should go without saying, but if you download a new version of the server, you will need to also copy your file to the new name as well. This has the nice feature that you can have different options for different versions and easily run the version of your choice.

P.S. Please send me any good options you have found has helped you and I will pass it along to others.

P.S.S. Also note, that some options are specific to a particular version of Java or Vendor. Unless noted otherwise, these all apply to the Oracle (previously Sun Microsystems) version of the Java Runtime.

Windows Task Manager

To see if the memory changes took affect, you need to open Windows Task Manager and go to the "details" tab. Right click on the column header and select "Select Columns". From this list put a check mark on "Commit Size" and "Command Line". "Command Line" should show my initial memory sizes and the ones you specified. Java will use the last one found on the command line. "Commit Size" will roughly relate to the -Xmx setting. "Memory (Private Working Set)" will roughly relate to -Xms setting.

You can’t perform that action at this time.