Building and running from JAR - SanchoGGP/ggp-base GitHub Wiki

Creating a Sancho JAR

  1. In Eclipse right-click the package node in package explorer for Sancho (org.ggp.base.player.gamer.statemachine.sancho) and select "Export...".
  2. In the wizard that results select Java\Runnable JAR file on the first page.
  3. In the next page...
  • Select the correct launch configuration from the drop down. For headless systems, choose a PlayerRunner-based configuration. For everything else, choose a Player configuration.

  • Select the first library handling option ("Extract required libraries into generated JAR")

  • Export to "Sancho.jar"

  • Hit "Finish".

Running from a JAR

Windows (& Linux with X11)

java -XX:+UseG1GC -Xmx5g -Xss2m -d64 -jar Sancho.jar

Headless systems

On headless systems, the basic invocation is...

java -XX:+UseG1GC -Xmx5g -Xss2m -d64 -jar Sancho.jar 9147 Sancho

...but this terminates after a single game, so you'll need to run in a loop. For example, on Linux...

while :; do java -XX:+UseG1GC -Xmx5g -Xss2m -d64 -jar Sancho.jar 9147 Sancho; done