Today, Java has gaining popularity in software development. Java has widely used in many system and lots of running system has been developed. In compiler design code optimization is one of the important phase. This paper describes new java code optimization techniques for execution of java program by reducing time and space consumption. The authors review and discuss some effective compiler optimization techniques for java compiler such as dead code elimination, inclining small function, code hoisting, eliminating common sub-expression. Here, in this paper, they describe some new techniques to reduce runtime overhead on java compiler by proper use of data structure, exception handling and garbage collection.