I am running 64 bit Java on 64 bit Windows.

I am aware that I can allocate a higher memory limit
to 64 bit Java via the -Xmx switch.

Is it possible to successfully update this in memory by adjusting a
property in memory, and not via the particular of accessing
a command line switch, or not?

For reasons I'm not sure about, the following code does not
behave as intended:

Properties properties = System.getProperties();

properties.setProperty("sun.java.command",
properties.getProperty("sun.java.command")
+ " -Xmx8000m");

System.setProperties(properties);

LinkedList<Object> list = new LinkedList<Object>();

while(true)
{
list.add(new Object());
}


?