views:

32

answers:

1

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
-XX:PermSize=256m -Xms512m -Xmx512m
jeff
i tried different settings
jeff
-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
@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
Agree, check you are running with the latest Java 6.
Thorbjørn Ravn Andersen