1. A computer program product comprising a non-transitory computer readable storage medium having a application runtime environment stored therein, wherein the application runtime environment, when executed within a virtual machine within a plurality of virtual machines executing on a data processing system, causes the data processing system to: receive notification of a change in energy policy for the virtual machine; and responsive to determining the virtual machine is to be run under a power cap based on the notification of a change in energy policy, dynamically modify execution of an application in the application runtime environment, wherein the application comprises a set of application modules and Wherein each given application module in the set of application modules has an attribute that indicates whether the given application module is sensitive to power capping, wherein a virtual machine monitor virtualizes hardware resources of the data processing system to be allocated to the plurality of virtual machines, and wherein modifying execution of applications in the application runtime environment comprises querying a service registry for a power-conservative alternate version of a given application module within the set of application modules and deploying the alternate version of the given application module in the application runtime environment.