when i'm running my project in eclipse, it works fine, when i export it as standalone jar it lags. i'm using the same vmargs, tried 3 different export settings in eclipse, nothing seems to help
+1
A:
It sounds to me like a JVM warmup or garbage collection issue.
I would take another look at the way that you are launching the game / application from the standalone JAR.
- check that you are running with Java 6.0
- experiment with the -client and -server policies
- experiment with giving it a larger initial heap (-Xms)
- experiment with using the CMS garbage collector.
Stephen C
2010-09-07 01:22:33
-XX:PermSize=256m -Xms512m -Xmx512m
jeff
2010-09-07 01:54:36
i tried different settings
jeff
2010-09-07 01:55:02
-XX:PermSize=756m -Xms756m -Xmx756m or -XX:PermSize=256m -Xms1328m -Xmx1328m or -XX:PermSize=1024m -Xms512m -Xmx512m but get no visible effect. eclipse just using the default settings plus this vargs. i have no clue about garbage collection settings
jeff
2010-09-07 01:56:47
@jeff, as Stephen said, you should also verify that your standalone JAR is being run with the same Java version as what it was running in under Eclipse.
davmac
2010-09-07 03:23:17
Agree, check you are running with the latest Java 6.
Thorbjørn Ravn Andersen
2010-09-07 06:24:56