I am trying to find a way to make my Java Appengine application discover whether it is running on the Appengine servers or inside the development environment mini-server. I would like to do this programmatically, not via some property file or other configuration option. Anyone got any ideas?
A:
Inside the App Engine the following system variables are set:
http://code.google.com/intl/de-DE/appengine/docs/java/runtime.html#The_Environment
With System.getProperty
it should be easy to test if your running in the App Engine.
Markus Knittig
2010-02-03 15:54:36
It looks like that doc page is a bit out of date as it doesn't include the new google specific properties.
Peter Recore
2010-02-03 15:57:54
+2
A:
Version 1.3.0 of the SDK added some system properties you can check to get this kind of info:
com.google.appengine.runtime.{version,environment}
Peter Recore
2010-02-03 15:55:03
Thank you! I did not notice the new runtime properties even though I run 1.3.0.
Georgios Gousios
2010-02-04 07:53:38