The Java virtual machine (JVM) is studied, which is the core of a Java platform. The composition and running mechanism of the open-source JVM——Kaffe are mainly analysed,and the key techniques of porting Kaffe to given CPU and operating system for specific embedded application are studied, then the porting scheme is provided. The paper can be showed as a reference for Java virtual machine applying in embedded systems.