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?
2 Answers
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}
1 Comment
Georgios Gousios
Thank you! I did not notice the new runtime properties even though I run 1.3.0.
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.
1 Comment
Peter Recore
It looks like that doc page is a bit out of date as it doesn't include the new google specific properties.