I try to split OpenStreeemMap which weights 350MB into smaller peaces using http://wiki.openstreetmap.org/wiki/OSMT. When I run it from cmd line it finishes in like 40s.
However, when I try to import it to Eclipse and invoke method it takes like 15 minutes or it stucks.
I set Xmx1024m and Xms256m in Eclipse run configuration. I tried to run command line from Java code but this also runs very slowly.
1) You can compare all the VM arguments: [How to get vm arguments from inside of java application?
2) If you are interested, You can try JVMMonitor (Eclipse Market Place).