Java is one of the most popular programming languages for the development of portable workstation and server applications available today. Because of its clean design and typesafety, it is also becoming attractive in the domain of embedded systems. Unfortunately, the dynamic features of the language and its rich class library cause considerable overhead in terms of runtime and memory consumption. Efficient techniques to implement Java virtual machines that are suitable for use in resource constrained environments are thus needed. In this work we present a solution for very restricted environments based on CACAO. CACAO is a just-intime compiling virtual machine implementation, combining high speed and small size. We have modified the original version of CACAO to run without an underlying operating system within only 1 MB of memory. In addition we present a new technique to selectively compile methods during the initialization phase of real-time Java applications to prevent unwanted i...