The arg parsing is much more complex than that -- surely -mx can go anywhere. Also, we'd be imposing our idea of what args were permissible in a Java program, What's wrong with setting the max heap size in a C++ main() function and then starting your program with the invocation interface? That way you can do anything you want before starting Java. Andrew.