How to get 3.1 build information in-game?

I’d like to show jme version and build inside my game, like this:

Running on jMonkeyEngine 3.1.0 (snapshot-github)

  • Branch: master
  • Git Hash: 58aed8b
  • Build Date: 2015-05-05

Where do I get this information?

Use the class “JmeVersion”.
E.g.

JmeVersion.FULL_NAME
JmeVersion.BRANCH_NAME
JmeVersion.GIT_SHORT_HASH
JmeVersion.BUILD_DATE
1 Like

But note: there is a non-zero chance that this might change as generating a Java file is pretty ugly and there much friendlier/supportable approaches. We really should add some static methods to that class to return those values so that at least we have options and aren’t locked into forever supporting version info as raw fields.

2 Likes