Reputation: 2455
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?
Upvotes: 4
Views: 137
Reputation: 14187
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}
Upvotes: 3
Reputation: 631
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.
Upvotes: 0