To reproduce:
Create any bundle using the following properties:
Map<String, String> userJvmOptions = new HashMap<String, String>();
userJvmOptions.put("-Xmx", "1024m");
userJvmOptions .put("-Xms", "1024m");
params.put(USER_JVM_OPTIONS.getID(), userJvmOptions);
The bundled application won't start.
E.g. on Windows using EXE bundler I got the following values in the .cfg file:
jvmuserarg.1.name=-Xmx
jvmuserarg.1.value=1024m
jvmuserarg.2.name=-Xms
jvmuserarg.2.value=1024m
When I run the app I got:
Error occurred during initialization of VM
Initial heap size set to a larger value than the maximum heap size.
If I don't specify the Xmx value then the following code
{{
RuntimeMXBean bean = ManagementFactory.getRuntimeMXBean();
List<String> aList = bean.getInputArguments();
for (String prop : aList) {
System.out.println(prop);
}
}}
returns:
-Xmx100m
Create any bundle using the following properties:
Map<String, String> userJvmOptions = new HashMap<String, String>();
userJvmOptions.put("-Xmx", "1024m");
userJvmOptions .put("-Xms", "1024m");
params.put(USER_JVM_OPTIONS.getID(), userJvmOptions);
The bundled application won't start.
E.g. on Windows using EXE bundler I got the following values in the .cfg file:
jvmuserarg.1.name=-Xmx
jvmuserarg.1.value=1024m
jvmuserarg.2.name=-Xms
jvmuserarg.2.value=1024m
When I run the app I got:
Error occurred during initialization of VM
Initial heap size set to a larger value than the maximum heap size.
If I don't specify the Xmx value then the following code
{{
RuntimeMXBean bean = ManagementFactory.getRuntimeMXBean();
List<String> aList = bean.getInputArguments();
for (String prop : aList) {
System.out.println(prop);
}
}}
returns:
-Xmx100m