Running jar in eclipse works slower

122 Views Asked by At

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.

2

There are 2 best solutions below

0
On
36128 osmt.Main --split ----index-file=D:/Splitter/Splitted/node2tn --output-dir=D:/Splitter/Splitted --tile-size=0.1 D:/Splitter/map
4696  -Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx512m -XX:MaxPermSize=256m
28344 it.polito.appeal.traci.examples.OpenStepsClose -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:61123 -Xmx1024M -Xms256M -Dfile.encoding=Cp1252
20748 com.sun.javaws.Main -secure C:\Users\xxx\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\45\3ca5a4ad-384499c4 -DcmxServerMode=ejb -Dorg.omg.CORBA.ORBClass=com.ibm.CORBA.iiop.ORB -Dorg.omg.CORBA.ORBSingletonClass=com.ibm.rmi.corba.ORBSingleton -Djavax.rmi.CORBA.StubClass=com.ibm.rmi.javax.rmi.CORBA.StubDelegateImpl -Djavax.rmi.CORBA.PortableRemoteObjectClass=com.ibm.rmi.javax.rmi.PortableRemoteObject -Djava.naming.factory.url.pkgs=com.ibm.ws.naming -Dcom.ibm.CORBA.enableClientCallbacks=true -Xbootclasspath/a:C:\Program Files (x86)\Java\jre7\lib\deploy.jar;C:\Program Files (x86)\Java\jre7\lib\javaws.jar;C:\Program Files (x86)\Java\jre7\lib\plugin.jar -Xverify:remote -Xmx512m -Xms128m 
37200 sun.tools.jps.Jps -lvm -Denv.class.path=C:\Users\xxx\Desktop\JADE\;D:\Splitter -Dapplication.home=C:\Program Files (x86)\Java\jdk1.6.0_45 -Xms8m
28224  -Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx512m -XX:MaxPermSize=256m

So as we can see when I run it from Eclipse its task 28344 , when I run from cmd its probabaly 37200

0
On

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).