I have a Java SDK which may either run on Heroku, Android, Google App Engine etc. I need to identify when the runtime environment is Heroku. How can I do that?
System.getenv("DYNO")
on Heroku will return the dyno name (like "web.1"). This could be used.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.