OSGi was designed with embedded systems in mind, its current support is insufficient for coping with one main characteristic of many embedded systems: real-time performance. This article analyzes different key issues in providing OSGi with real-time Java performance covering motivational issues, and different integration ways and challenges stemming from the integration. It also contributes a general framework for introducing real-time performance in OSGi, which is called the real-time for OSGi framework. The framework uses real-time Java virtual machines and the real-time specification for Java. The adoption of this framework allows cyber-physical systems to experience real-time Java performance in their applications. The framework introduces several integration levels for OSGi and real-time specification for Java, and specific real-time OSGi services. An empirical implementation was carried out using standard software, which was extended with the new defined services. Copyright © 2012 John Wiley & Sons, Ltd.