This paper starts with the structure of Java system and elaborates various security models of Java.On the basis of which it analyzes security characteristics and mechanism of Java,and solves the problem that how Java protects users' systems and runtime environment.