I have an application which can run locally on my computer and also on aws ec2 instance. In both the cases I need to perform 2 different operations. Is there a simple way in Java to identify if the current application is running on ec2 or local machine?
its different than the suggested answer because I dont have the HttpWebRequest etc access in my code.