so I forced iPV4 by adding this to my** Spark.vmoptions** file
*.vmoptions files
A common requirement is to adjust the VM parameters of your application launchers depending on the runtime environment like the target platform or some user selection in the installer.
In addition to the fixed VM parameters, a parameter file in the same directory as the executable is read and its contents are added to the existing VM parameters. The name of this parameter file is the same as the executable file with the extension .vmoptions
. For example, if your executable is named hello.exe
, the name of the VM parameter file is hello.vmoptions
. In this file, each line is interpreted as a single VM parameter. The last line must be followed by a line feed. install4j adapts your .vmoptions files during the compilation phase so that the line endings are suitable for all platforms. For example, the contents of the VM parameter file could be:
-Xmx128m -Xms32m
The .vmoptions
files allow the installer as well as expert users to modify the VM parameters for your application launchers.
It is possible to include other .vmoptions
files from a .vmoptions
file with the syntax
-include-options [path to other .vmoptions file]
For maximum cross-platform capability use just one include per .vmoptions
file. Recursive includes are supported. You can also add this option to the fixed VM parameters of a launcher. In that way, you do not have to create .vmoptions
files for all your launchers, but you can have a single .vmoptions
file for all of them.
This allows you to to centralize the user-editable VM options for multiple launchers and to have .vmoptions
files in a location that can be edited by the user if the installation directory is not writable. You can use environment variables to find a suitable directory, for example
-include-options ${APPDATA}\My Application\my.vmoptions
on Windows and
-include-options ${HOME}/.myApp/my.vmoptions
on Unix. If you have to decide at runtime where the included .vmoptions
file is located, use an installer variable:
-include-options ${installer:vmOptionsTargetDirectory}/my.vmoptions
and add a “Replace installer variables in a text file” action to replace it after you have set the the vmOptionsTargetDirectory
installer variable to a suitable path with a “Set a variable” action.
In addition to the VM parameters you can also modify the classpath in the .vmoptions
files with the following options:
- -classpath [classpath]
Replace the classpath of the generated launcher.
- -classpath/a [classpath]
Append to the classpath of the generated launcher.
- -classpath/p [classpath]
Prepend to the classpath of the generated launcher.
For GUI launchers on Mac OS X, the VM options are stored in a file called Info.plist
inside the application bundle. The “Add VM options” action described below handles these platform-specific differences. .vmoptions files are not supported on Mac OS X.